/*
               File: Gx0010
        Description: Selection List User
             Author: GeneXus C# Generator version 10_2_5-78484
       Generated on: 6/6/2014 9:53:14.9
       Program type: Callable routine
          Main DBMS: sqlserver
*/
using System;
using System.Collections;
using GeneXus.Utils;
using GeneXus.Resources;
using GeneXus.Application;
using GeneXus.Metadata;
using System.Data;
using System.Data.SqlClient;
using GeneXus.Data;
using com.genexus;
using GeneXus.Data.ADO;
using GeneXus.Data.NTier;
using GeneXus.Data.NTier.ADO;
using System.Runtime.Remoting;
using GeneXus.WebControls;
using GeneXus.Http;
using GeneXus.XML;
using GeneXus.Search;
using GeneXus.Encryption;
using GeneXus.Http.Client;
using System.Xml.Serialization;
using System.Data.SqlTypes;
using System.ServiceModel;
using System.Runtime.Serialization;
namespace GeneXus.Programs {
   public class gx0010 : GXDataArea, System.Web.SessionState.IRequiresSessionState
   {
      public gx0010( )
      {
         context = new GxContext(  );
         DataStoreUtil.LoadDataStores( context);
         dsDefault = context.GetDataStore("Default");
         IsMain = true;
         context.SetDefaultTheme("GeneXusXEv2");
      }

      public gx0010( IGxContext context )
      {
         this.context = context;
         IsMain = false;
         dsDefault = context.GetDataStore("Default");
      }

      public void release( )
      {
      }

      public void execute( out long aP0_pUserId )
      {
         this.AV13pUserId = 0 ;
         executePrivate();
         aP0_pUserId=this.AV13pUserId;
      }

      void executePrivate( )
      {
         isStatic = false;
         webExecute();
      }

      protected override void createObjects( )
      {
      }

      protected void INITWEB( )
      {
         context.SetDefaultTheme("GeneXusXEv2");
         initialize_properties( ) ;
         if ( nGotPars == 0 )
         {
            entryPointCalled = false;
            gxfirstwebparm = GetNextPar( );
            gxfirstwebparm_bkp = gxfirstwebparm;
            gxfirstwebparm = DecryptAjaxCall( gxfirstwebparm);
            if ( StringUtil.StrCmp(gxfirstwebparm, "dyncall") == 0 )
            {
               setAjaxCallMode();
               if ( ! IsValidAjaxCall( true) )
               {
                  GxWebError = 1;
                  return  ;
               }
               dyncall( GetNextPar( )) ;
               return  ;
            }
            else if ( StringUtil.StrCmp(gxfirstwebparm, "gxajaxEvt") == 0 )
            {
               setAjaxEventMode();
               if ( ! IsValidAjaxCall( true) )
               {
                  GxWebError = 1;
                  return  ;
               }
               gxfirstwebparm = GetNextPar( );
            }
            else if ( StringUtil.StrCmp(gxfirstwebparm, "gxajaxNewRow_"+"Grid1") == 0 )
            {
               nRC_Grid1 = (short)(NumberUtil.Val( GetNextPar( ), "."));
               nGXsfl_51_idx = (short)(NumberUtil.Val( GetNextPar( ), "."));
               sGXsfl_51_idx = GetNextPar( );
               setAjaxCallMode();
               if ( ! IsValidAjaxCall( true) )
               {
                  GxWebError = 1;
                  return  ;
               }
               gxnrGrid1_newrow( nRC_Grid1, nGXsfl_51_idx, sGXsfl_51_idx) ;
               return  ;
            }
            else if ( StringUtil.StrCmp(gxfirstwebparm, "gxajaxGridRefresh_"+"Grid1") == 0 )
            {
               /* GeneXus formulas. */
               context.Gx_err = 0;
               Grid1_PageSize51 = (int)(NumberUtil.Val( GetNextPar( ), "."));
               AV6cUserId = (long)(NumberUtil.Val( GetNextPar( ), "."));
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV6cUserId", StringUtil.LTrim( StringUtil.Str( (decimal)(AV6cUserId), 15, 0)));
               AV7cUserCID = (int)(NumberUtil.Val( GetNextPar( ), "."));
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV7cUserCID", StringUtil.LTrim( StringUtil.Str( (decimal)(AV7cUserCID), 6, 0)));
               AV8cUserIniciacao = context.localUtil.ParseDateParm( GetNextPar( ));
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV8cUserIniciacao", context.localUtil.Format(AV8cUserIniciacao, "99/99/9999"));
               AV9cUserElevacao = context.localUtil.ParseDateParm( GetNextPar( ));
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV9cUserElevacao", context.localUtil.Format(AV9cUserElevacao, "99/99/9999"));
               AV10cUserRG = GetNextPar( );
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV10cUserRG", AV10cUserRG);
               AV11cUserCPF = (long)(NumberUtil.Val( GetNextPar( ), "."));
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV11cUserCPF", StringUtil.LTrim( StringUtil.Str( (decimal)(AV11cUserCPF), 11, 0)));
               AV12cUserTel = GetNextPar( );
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV12cUserTel", AV12cUserTel);
               setAjaxCallMode();
               if ( ! IsValidAjaxCall( true) )
               {
                  GxWebError = 1;
                  return  ;
               }
               gxgrGrid1_refresh( Grid1_PageSize51, AV6cUserId, AV7cUserCID, AV8cUserIniciacao, AV9cUserElevacao, AV10cUserRG, AV11cUserCPF, AV12cUserTel) ;
               return  ;
            }
            else
            {
               if ( ! IsValidAjaxCall( false) )
               {
                  GxWebError = 1;
                  return  ;
               }
               gxfirstwebparm = gxfirstwebparm_bkp;
            }
            if ( ! entryPointCalled )
            {
               AV13pUserId = (long)(NumberUtil.Val( gxfirstwebparm, "."));
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV13pUserId", StringUtil.LTrim( StringUtil.Str( (decimal)(AV13pUserId), 15, 0)));
            }
         }
      }

      public override void webExecute( )
      {
         if ( initialized == 0 )
         {
            createObjects();
            initialize();
         }
         INITWEB( ) ;
         if ( ! isAjaxCallMode( ) )
         {
            MasterPageObj = (GXMasterPage) ClassLoader.GetInstance("promptmasterpage", "GeneXus.Programs.promptmasterpage", new Object[] {new GxContext( context.handle, context.DataStores, context.HttpContext)});
            MasterPageObj.setDataArea(this,true);
            MasterPageObj.webExecute();
            if ( ( GxWebError == 0 ) && context.isAjaxRequest( ) )
            {
               enableOutput();
               if ( ! context.isAjaxRequest( ) )
               {
                  context.GX_webresponse.AppendHeader("Cache-Control", "max-age=0");
               }
               if ( String.IsNullOrEmpty(StringUtil.RTrim( context.wjLoc)) )
               {
                  context.GX_webresponse.AddString((String)(context.getJSONResponse( )));
               }
               else
               {
                  if ( context.isAjaxRequest( ) )
                  {
                     disableOutput();
                  }
                  RenderHtmlHeaders( ) ;
                  context.Redirect( context.wjLoc );
                  context.DispatchAjaxCommands();
               }
            }
         }
         this.cleanup();
      }

      public override short ExecuteStartEvent( )
      {
         PA0E2( ) ;
         gxajaxcallmode = (short)((isAjaxCallMode( ) ? 1 : 0));
         if ( ( gxajaxcallmode == 0 ) && ( GxWebError == 0 ) )
         {
            START0E2( ) ;
         }
         return gxajaxcallmode ;
      }

      public override void RenderHtmlHeaders( )
      {
         GxWebStd.gx_html_headers( context, 0, "", "", Form.Meta, Form.Metaequiv);
      }

      public override void RenderHtmlOpenForm( )
      {
         context.WriteHtmlText( "<title>") ;
         context.SendWebValue( Form.Caption) ;
         context.WriteHtmlTextNl( "</title>") ;
         if ( StringUtil.Len( sDynURL) > 0 )
         {
            context.WriteHtmlText( "<BASE href=\""+sDynURL+"\" />") ;
         }
         define_styles( ) ;
         if ( nGXWrapped != 1 )
         {
            MasterPageObj.master_styles();
         }
         if ( ! context.isSmartDevice( ) )
         {
            context.AddJavascriptSource("gxtimezone.js", "?"+context.GetBuildNumber( 78484));
            context.AddJavascriptSource("gxgral.js", "?"+context.GetBuildNumber( 78484));
            context.AddJavascriptSource("gxcfg.js", "?2014669531413");
         }
         else
         {
            context.AddJavascriptSource("gxtimezone.js", "?"+context.GetBuildNumber( 78484));
            context.AddJavascriptSource("gxapiSD.js", "?"+context.GetBuildNumber( 78484));
            context.AddJavascriptSource("gxfxSD.js", "?"+context.GetBuildNumber( 78484));
            context.AddJavascriptSource("gxhtmlSD.js", "?"+context.GetBuildNumber( 78484));
            context.AddJavascriptSource("gxtypesSD.js", "?"+context.GetBuildNumber( 78484));
            context.AddJavascriptSource("gxpopupSD.js", "?"+context.GetBuildNumber( 78484));
            context.AddJavascriptSource("gxfrmutlSD.js", "?"+context.GetBuildNumber( 78484));
            context.AddJavascriptSource("gxgridSD.js", "?"+context.GetBuildNumber( 78484));
            context.AddJavascriptSource("JavaScripTableSD.js", "?"+context.GetBuildNumber( 78484));
            context.AddJavascriptSource("rijndaelSD.js", "?"+context.GetBuildNumber( 78484));
            context.AddJavascriptSource("gxgralSD.js", "?"+context.GetBuildNumber( 78484));
            context.AddJavascriptSource("gxcfg.js", "?"+context.GetBuildNumber( 78484));
         }
         context.AddJavascriptSource("calendar.js", "?"+context.GetBuildNumber( 78484));
         context.AddJavascriptSource("calendar-setup.js", "?"+context.GetBuildNumber( 78484));
         context.AddJavascriptSource("calendar-en.js", "?"+context.GetBuildNumber( 78484));
         context.WriteHtmlText( Form.Headerrawhtml) ;
         context.CloseHtmlHeader();
         FormProcess = " onkeyup=\"gx.evt.onkeyup(event)\" onkeypress=\"gx.evt.onkeypress(event,true,false)\" onkeydown=\"gx.evt.onkeypress(null,true,false)\"";
         context.WriteHtmlText( "<body") ;
         context.WriteHtmlText( " "+"class=\"Form\""+" "+" style=\"-moz-opacity:0;opacity:0;"+"background-color:"+context.BuildHTMLColor( Form.Backcolor)+";") ;
         if ( ! ( String.IsNullOrEmpty(StringUtil.RTrim( Form.Background)) ) )
         {
            context.WriteHtmlText( " background-image:url("+context.convertURL( Form.Background)+")") ;
         }
         context.WriteHtmlText( "\""+FormProcess+">") ;
         context.skipLines(1);
         context.WriteHtmlTextNl( "<form id=\"MAINFORM\" onsubmit=\"try{return gx.csv.validForm()}catch(e){return true;}\" name=\"MAINFORM\" method=\"post\" class=\"Form\" novalidate action=\""+formatLink("gx0010.aspx") + "?" + UrlEncode("" +AV13pUserId)+"\">") ;
         GxWebStd.gx_hidden_field( context, "_EventName", "");
         GxWebStd.gx_hidden_field( context, "_EventGridId", "");
         GxWebStd.gx_hidden_field( context, "_EventRowId", "");
      }

      public override void RenderHtmlCloseForm( )
      {
         /* Send hidden variables. */
         GxWebStd.gx_hidden_field( context, "GXH_vCUSERID", StringUtil.LTrim( StringUtil.NToC( (decimal)(AV6cUserId), 15, 0, ".", "")));
         GxWebStd.gx_hidden_field( context, "GXH_vCUSERCID", StringUtil.LTrim( StringUtil.NToC( (decimal)(AV7cUserCID), 6, 0, ".", "")));
         GxWebStd.gx_hidden_field( context, "GXH_vCUSERINICIACAO", context.localUtil.Format(AV8cUserIniciacao, "99/99/9999"));
         GxWebStd.gx_hidden_field( context, "GXH_vCUSERELEVACAO", context.localUtil.Format(AV9cUserElevacao, "99/99/9999"));
         GxWebStd.gx_hidden_field( context, "GXH_vCUSERRG", StringUtil.RTrim( AV10cUserRG));
         GxWebStd.gx_hidden_field( context, "GXH_vCUSERCPF", StringUtil.LTrim( StringUtil.NToC( (decimal)(AV11cUserCPF), 11, 0, ".", "")));
         GxWebStd.gx_hidden_field( context, "GXH_vCUSERTEL", StringUtil.RTrim( AV12cUserTel));
         /* Send saved values. */
         GxWebStd.gx_hidden_field( context, "nRC_Grid1", StringUtil.LTrim( StringUtil.NToC( (decimal)(nRC_Grid1), 4, 0, ".", "")));
         GxWebStd.gx_hidden_field( context, "vPUSERID", StringUtil.LTrim( StringUtil.NToC( (decimal)(AV13pUserId), 15, 0, ".", "")));
         GxWebStd.gx_hidden_field( context, "GRID1_nFirstRecordOnPage", StringUtil.LTrim( StringUtil.NToC( (decimal)(GRID1_nFirstRecordOnPage), 6, 0, ".", "")));
         GxWebStd.gx_hidden_field( context, "GRID1_nEOF", StringUtil.LTrim( StringUtil.NToC( (decimal)(GRID1_nEOF), 1, 0, ".", "")));
         GxWebStd.gx_hidden_field( context, "GX_FocusControl", GX_FocusControl);
         SendAjaxEncryptionKey();
         SendComponentObjects();
         SendServerCommands();
         SendState();
         context.WriteHtmlTextNl( "</form>") ;
         include_jscripts( ) ;
      }

      public override void RenderHtmlContent( )
      {
         gxajaxcallmode = (short)((isAjaxCallMode( ) ? 1 : 0));
         if ( ( gxajaxcallmode == 0 ) && ( GxWebError == 0 ) )
         {
            WE0E2( ) ;
         }
      }

      public override void DispatchEvents( )
      {
         EVT0E2( ) ;
      }

      public override bool HasEnterEvent( )
      {
         return true ;
      }

      public override String GetPgmname( )
      {
         return "Gx0010" ;
      }

      public override String GetPgmdesc( )
      {
         return "Selection List User" ;
      }

      public override GXWebForm GetForm( )
      {
         return Form ;
      }

      public override String GetSelfLink( )
      {
         return formatLink("gx0010.aspx") + "?" + UrlEncode("" +AV13pUserId) ;
      }

      protected void WB0E0( )
      {
         if ( context.isAjaxRequest( ) )
         {
            disableOutput();
         }
         if ( ! wbLoad )
         {
            if ( nGXWrapped == 1 )
            {
               RenderHtmlHeaders( ) ;
               RenderHtmlOpenForm( ) ;
            }
            wb_table1_2_0E2( true) ;
         }
         else
         {
            wb_table1_2_0E2( false) ;
         }
         return  ;
      }

      protected void wb_table1_2_0E2e( bool wbgen )
      {
         if ( wbgen )
         {
         }
         wbLoad = true;
      }

      protected void START0E2( )
      {
         wbLoad = false;
         wbEnd = 0;
         wbStart = 0;
         Form.Meta.addItem("generator", "GeneXus C# 10_2_5-78484", 0) ;
         Form.Meta.addItem("description", "Selection List User", 0) ;
         context.wjLoc = "";
         context.nUserReturn = 0;
         context.wbHandled = 0;
         if ( StringUtil.StrCmp(context.GetRequestMethod( ), "POST") == 0 )
         {
         }
         wbErr = false;
         STRUP0E0( ) ;
      }

      protected void WS0E2( )
      {
         START0E2( ) ;
         EVT0E2( ) ;
      }

      protected void EVT0E2( )
      {
         if ( StringUtil.StrCmp(context.GetRequestMethod( ), "POST") == 0 )
         {
            if ( String.IsNullOrEmpty(StringUtil.RTrim( context.wjLoc)) && ( context.nUserReturn != 1 ) && ! wbErr )
            {
               /* Read Web Panel buttons. */
               sEvt = cgiGet( "_EventName");
               EvtGridId = cgiGet( "_EventGridId");
               EvtRowId = cgiGet( "_EventRowId");
               if ( StringUtil.Len( sEvt) > 0 )
               {
                  sEvtType = StringUtil.Left( sEvt, 1);
                  sEvt = StringUtil.Right( sEvt, (short)(StringUtil.Len( sEvt)-1));
                  if ( StringUtil.StrCmp(sEvtType, "M") != 0 )
                  {
                     if ( StringUtil.StrCmp(sEvtType, "E") == 0 )
                     {
                        sEvtType = StringUtil.Right( sEvt, 1);
                        if ( StringUtil.StrCmp(sEvtType, ".") == 0 )
                        {
                           sEvt = StringUtil.Left( sEvt, (short)(StringUtil.Len( sEvt)-1));
                           if ( StringUtil.StrCmp(sEvt, "RFR") == 0 )
                           {
                              context.wbHandled = 1;
                              dynload_actions( ) ;
                              /* No code required for Cancel button. It is implemented as the Reset button. */
                           }
                           else if ( StringUtil.StrCmp(sEvt, "LSCR") == 0 )
                           {
                              context.wbHandled = 1;
                              dynload_actions( ) ;
                           }
                           else if ( StringUtil.StrCmp(sEvt, "GRID1PAGING") == 0 )
                           {
                              context.wbHandled = 1;
                              sEvt = cgiGet( "GRID1PAGING");
                              if ( StringUtil.StrCmp(sEvt, "FIRST") == 0 )
                              {
                                 subgrid1_firstpage( ) ;
                              }
                              else if ( StringUtil.StrCmp(sEvt, "PREV") == 0 )
                              {
                                 subgrid1_previouspage( ) ;
                              }
                              else if ( StringUtil.StrCmp(sEvt, "NEXT") == 0 )
                              {
                                 subgrid1_nextpage( ) ;
                              }
                              else if ( StringUtil.StrCmp(sEvt, "LAST") == 0 )
                              {
                                 subgrid1_lastpage( ) ;
                              }
                              dynload_actions( ) ;
                           }
                        }
                        else
                        {
                           sEvtType = StringUtil.Right( sEvt, 4);
                           sEvt = StringUtil.Left( sEvt, (short)(StringUtil.Len( sEvt)-4));
                           if ( ( StringUtil.StrCmp(StringUtil.Left( sEvt, 5), "START") == 0 ) || ( StringUtil.StrCmp(StringUtil.Left( sEvt, 4), "LOAD") == 0 ) || ( StringUtil.StrCmp(StringUtil.Left( sEvt, 5), "ENTER") == 0 ) )
                           {
                              nGXsfl_51_idx = (short)(NumberUtil.Val( sEvtType, "."));
                              sGXsfl_51_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_51_idx), 4, 0)), 4, "0");
                              edtavLinkselection_Internalname = "vLINKSELECTION_"+sGXsfl_51_idx;
                              edtUserId_Internalname = "USERID_"+sGXsfl_51_idx;
                              edtUserCID_Internalname = "USERCID_"+sGXsfl_51_idx;
                              edtUserIniciacao_Internalname = "USERINICIACAO_"+sGXsfl_51_idx;
                              edtUserElevacao_Internalname = "USERELEVACAO_"+sGXsfl_51_idx;
                              edtUserRG_Internalname = "USERRG_"+sGXsfl_51_idx;
                              edtUserCPF_Internalname = "USERCPF_"+sGXsfl_51_idx;
                              edtUserTel_Internalname = "USERTEL_"+sGXsfl_51_idx;
                              edtUserCel_Internalname = "USERCEL_"+sGXsfl_51_idx;
                              edtUserEnderecoNumero_Internalname = "USERENDERECONUMERO_"+sGXsfl_51_idx;
                              AV5LinkSelection = cgiGet( edtavLinkselection_Internalname);
                              A43UserId = (long)(context.localUtil.CToN( cgiGet( edtUserId_Internalname), ".", ","));
                              A1UserCID = (int)(context.localUtil.CToN( cgiGet( edtUserCID_Internalname), ".", ","));
                              A3UserIniciacao = context.localUtil.CToD( cgiGet( edtUserIniciacao_Internalname), 1);
                              A4UserElevacao = context.localUtil.CToD( cgiGet( edtUserElevacao_Internalname), 1);
                              A5UserRG = cgiGet( edtUserRG_Internalname);
                              A6UserCPF = (long)(context.localUtil.CToN( cgiGet( edtUserCPF_Internalname), ".", ","));
                              A7UserTel = cgiGet( edtUserTel_Internalname);
                              A8UserCel = cgiGet( edtUserCel_Internalname);
                              A10UserEnderecoNumero = (int)(context.localUtil.CToN( cgiGet( edtUserEnderecoNumero_Internalname), ".", ","));
                              sEvtType = StringUtil.Right( sEvt, 1);
                              if ( StringUtil.StrCmp(sEvtType, ".") == 0 )
                              {
                                 sEvt = StringUtil.Left( sEvt, (short)(StringUtil.Len( sEvt)-1));
                                 if ( StringUtil.StrCmp(sEvt, "START") == 0 )
                                 {
                                    context.wbHandled = 1;
                                    dynload_actions( ) ;
                                    /* Execute user event: E110E2 */
                                    E110E2 ();
                                 }
                                 else if ( StringUtil.StrCmp(sEvt, "LOAD") == 0 )
                                 {
                                    context.wbHandled = 1;
                                    dynload_actions( ) ;
                                    /* Execute user event: E120E2 */
                                    E120E2 ();
                                 }
                                 else if ( StringUtil.StrCmp(sEvt, "ENTER") == 0 )
                                 {
                                    context.wbHandled = 1;
                                    if ( ! wbErr )
                                    {
                                       Rfr0gs = false;
                                       /* Set Refresh If Cuserid Changed */
                                       if ( ( context.localUtil.CToN( cgiGet( "GXH_vCUSERID"), ".", ",") != Convert.ToDecimal( AV6cUserId )) )
                                       {
                                          Rfr0gs = true;
                                       }
                                       /* Set Refresh If Cusercid Changed */
                                       if ( ( context.localUtil.CToN( cgiGet( "GXH_vCUSERCID"), ".", ",") != Convert.ToDecimal( AV7cUserCID )) )
                                       {
                                          Rfr0gs = true;
                                       }
                                       /* Set Refresh If Cuseriniciacao Changed */
                                       if ( context.localUtil.CToD( cgiGet( "GXH_vCUSERINICIACAO"), 1) != AV8cUserIniciacao )
                                       {
                                          Rfr0gs = true;
                                       }
                                       /* Set Refresh If Cuserelevacao Changed */
                                       if ( context.localUtil.CToD( cgiGet( "GXH_vCUSERELEVACAO"), 1) != AV9cUserElevacao )
                                       {
                                          Rfr0gs = true;
                                       }
                                       /* Set Refresh If Cuserrg Changed */
                                       if ( StringUtil.StrCmp(cgiGet( "GXH_vCUSERRG"), AV10cUserRG) != 0 )
                                       {
                                          Rfr0gs = true;
                                       }
                                       /* Set Refresh If Cusercpf Changed */
                                       if ( ( context.localUtil.CToN( cgiGet( "GXH_vCUSERCPF"), ".", ",") != Convert.ToDecimal( AV11cUserCPF )) )
                                       {
                                          Rfr0gs = true;
                                       }
                                       /* Set Refresh If Cusertel Changed */
                                       if ( StringUtil.StrCmp(cgiGet( "GXH_vCUSERTEL"), AV12cUserTel) != 0 )
                                       {
                                          Rfr0gs = true;
                                       }
                                       if ( ! Rfr0gs )
                                       {
                                          /* Execute user event: E130E2 */
                                          E130E2 ();
                                       }
                                       dynload_actions( ) ;
                                    }
                                 }
                                 else if ( StringUtil.StrCmp(sEvt, "LSCR") == 0 )
                                 {
                                    context.wbHandled = 1;
                                    dynload_actions( ) ;
                                 }
                              }
                              else
                              {
                              }
                           }
                        }
                     }
                     context.wbHandled = 1;
                  }
               }
            }
         }
      }

      protected void WE0E2( )
      {
         if ( ! GxWebStd.gx_redirect( context) )
         {
            Rfr0gs = true;
            Refresh( ) ;
            if ( ! GxWebStd.gx_redirect( context) )
            {
               if ( nGXWrapped == 1 )
               {
                  RenderHtmlCloseForm( ) ;
               }
            }
         }
      }

      protected void PA0E2( )
      {
         if ( nDonePA == 0 )
         {
            if ( String.IsNullOrEmpty(StringUtil.RTrim( context.GetCookie( "GX_SESSION_ID"))) )
            {
               gxcookieaux = context.SetCookie( "GX_SESSION_ID", Crypto.Encrypt64( Crypto.GetEncryptionKey( ), Crypto.GetServerKey( )), "", (DateTime)(DateTime.MinValue), "", 0);
            }
            GXKey = Crypto.Decrypt64( context.GetCookie( "GX_SESSION_ID"), Crypto.GetServerKey( ));
            if ( ! context.isAjaxRequest( ) )
            {
               GX_FocusControl = edtavCuserid_Internalname;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
            }
            nDonePA = 1;
         }
      }

      protected void dynload_actions( )
      {
         /* End function dynload_actions */
      }

      protected void gxnrGrid1_newrow( short nRC_Grid1 ,
                                       short nGXsfl_51_idx ,
                                       String sGXsfl_51_idx )
      {
         GxWebStd.set_html_headers( context, 0, "", "");
         edtavLinkselection_Internalname = "vLINKSELECTION_"+sGXsfl_51_idx;
         edtUserId_Internalname = "USERID_"+sGXsfl_51_idx;
         edtUserCID_Internalname = "USERCID_"+sGXsfl_51_idx;
         edtUserIniciacao_Internalname = "USERINICIACAO_"+sGXsfl_51_idx;
         edtUserElevacao_Internalname = "USERELEVACAO_"+sGXsfl_51_idx;
         edtUserRG_Internalname = "USERRG_"+sGXsfl_51_idx;
         edtUserCPF_Internalname = "USERCPF_"+sGXsfl_51_idx;
         edtUserTel_Internalname = "USERTEL_"+sGXsfl_51_idx;
         edtUserCel_Internalname = "USERCEL_"+sGXsfl_51_idx;
         edtUserEnderecoNumero_Internalname = "USERENDERECONUMERO_"+sGXsfl_51_idx;
         while ( nGXsfl_51_idx <= nRC_Grid1 )
         {
            sendrow_512( ) ;
            nGXsfl_51_idx = (short)(((subGrid1_Islastpage==1)&&(nGXsfl_51_idx+1>subGrid1_Recordsperpage( )) ? 1 : nGXsfl_51_idx+1));
            sGXsfl_51_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_51_idx), 4, 0)), 4, "0");
            edtavLinkselection_Internalname = "vLINKSELECTION_"+sGXsfl_51_idx;
            edtUserId_Internalname = "USERID_"+sGXsfl_51_idx;
            edtUserCID_Internalname = "USERCID_"+sGXsfl_51_idx;
            edtUserIniciacao_Internalname = "USERINICIACAO_"+sGXsfl_51_idx;
            edtUserElevacao_Internalname = "USERELEVACAO_"+sGXsfl_51_idx;
            edtUserRG_Internalname = "USERRG_"+sGXsfl_51_idx;
            edtUserCPF_Internalname = "USERCPF_"+sGXsfl_51_idx;
            edtUserTel_Internalname = "USERTEL_"+sGXsfl_51_idx;
            edtUserCel_Internalname = "USERCEL_"+sGXsfl_51_idx;
            edtUserEnderecoNumero_Internalname = "USERENDERECONUMERO_"+sGXsfl_51_idx;
         }
         context.GX_webresponse.AddString(Grid1Container.ToJavascriptSource());
         /* End function gxnrGrid1_newrow */
      }

      protected void gxgrGrid1_refresh( int Grid1_PageSize51 ,
                                        long AV6cUserId ,
                                        int AV7cUserCID ,
                                        DateTime AV8cUserIniciacao ,
                                        DateTime AV9cUserElevacao ,
                                        String AV10cUserRG ,
                                        long AV11cUserCPF ,
                                        String AV12cUserTel )
      {
         GxWebStd.set_html_headers( context, 0, "", "");
         subGrid1_Rows = (short)(Grid1_PageSize51);
         BackMsgLst = context.GX_msglist;
         context.GX_msglist = LclMsgLst;
         RF0E2( ) ;
         context.GX_msglist = BackMsgLst;
         context.GX_webresponse.AddString((String)(context.getJSONResponse( )));
         /* End function gxgrGrid1_refresh */
      }

      protected void Refresh( )
      {
         RF0E2( ) ;
         /* End function Refresh */
      }

      protected void RF0E2( )
      {
         Grid1Container.AddObjectProperty("GridName", "Grid1");
         Grid1Container.AddObjectProperty("CmpContext", "");
         Grid1Container.AddObjectProperty("InMasterPage", "false");
         Grid1Container.PageSize = subGrid1_Recordsperpage( );
         wbStart = 51;
         nGXsfl_51_idx = 1;
         sGXsfl_51_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_51_idx), 4, 0)), 4, "0");
         edtavLinkselection_Internalname = "vLINKSELECTION_"+sGXsfl_51_idx;
         edtUserId_Internalname = "USERID_"+sGXsfl_51_idx;
         edtUserCID_Internalname = "USERCID_"+sGXsfl_51_idx;
         edtUserIniciacao_Internalname = "USERINICIACAO_"+sGXsfl_51_idx;
         edtUserElevacao_Internalname = "USERELEVACAO_"+sGXsfl_51_idx;
         edtUserRG_Internalname = "USERRG_"+sGXsfl_51_idx;
         edtUserCPF_Internalname = "USERCPF_"+sGXsfl_51_idx;
         edtUserTel_Internalname = "USERTEL_"+sGXsfl_51_idx;
         edtUserCel_Internalname = "USERCEL_"+sGXsfl_51_idx;
         edtUserEnderecoNumero_Internalname = "USERENDERECONUMERO_"+sGXsfl_51_idx;
         if ( String.IsNullOrEmpty(StringUtil.RTrim( context.wjLoc)) && ( context.nUserReturn != 1 ) )
         {
            edtavLinkselection_Internalname = "vLINKSELECTION_"+sGXsfl_51_idx;
            edtUserId_Internalname = "USERID_"+sGXsfl_51_idx;
            edtUserCID_Internalname = "USERCID_"+sGXsfl_51_idx;
            edtUserIniciacao_Internalname = "USERINICIACAO_"+sGXsfl_51_idx;
            edtUserElevacao_Internalname = "USERELEVACAO_"+sGXsfl_51_idx;
            edtUserRG_Internalname = "USERRG_"+sGXsfl_51_idx;
            edtUserCPF_Internalname = "USERCPF_"+sGXsfl_51_idx;
            edtUserTel_Internalname = "USERTEL_"+sGXsfl_51_idx;
            edtUserCel_Internalname = "USERCEL_"+sGXsfl_51_idx;
            edtUserEnderecoNumero_Internalname = "USERENDERECONUMERO_"+sGXsfl_51_idx;
            GXPagingFrom2 = ((10==0) ? 1 : GRID1_nFirstRecordOnPage+1);
            GXPagingTo2 = ((10==0) ? 10000 : GRID1_nFirstRecordOnPage+subGrid1_Recordsperpage( )+1);
            pr_default.dynParam(0, new Object[]{ new Object[]{
                                                 AV7cUserCID ,
                                                 AV8cUserIniciacao ,
                                                 AV9cUserElevacao ,
                                                 AV10cUserRG ,
                                                 AV11cUserCPF ,
                                                 AV12cUserTel ,
                                                 A1UserCID ,
                                                 A3UserIniciacao ,
                                                 A4UserElevacao ,
                                                 A5UserRG ,
                                                 A6UserCPF ,
                                                 A7UserTel ,
                                                 AV6cUserId },
                                                 new int[] {
                                                 TypeConstants.INT, TypeConstants.DATE, TypeConstants.DATE, TypeConstants.STRING, TypeConstants.LONG, TypeConstants.STRING, TypeConstants.INT, TypeConstants.DATE, TypeConstants.DATE, TypeConstants.STRING,
                                                 TypeConstants.LONG, TypeConstants.STRING, TypeConstants.LONG
                                                 }
            });
            lV10cUserRG = StringUtil.PadR( StringUtil.RTrim( AV10cUserRG), 12, "%");
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV10cUserRG", AV10cUserRG);
            lV12cUserTel = StringUtil.PadR( StringUtil.RTrim( AV12cUserTel), 14, "%");
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV12cUserTel", AV12cUserTel);
            /* Using cursor H000E2 */
            pr_default.execute(0, new Object[] {AV6cUserId, AV7cUserCID, AV8cUserIniciacao, AV9cUserElevacao, lV10cUserRG, AV11cUserCPF, lV12cUserTel, GXPagingFrom2, GXPagingTo2, GXPagingTo2, GXPagingFrom2, GXPagingFrom2});
            nGXsfl_51_idx = 1;
            while ( ( (pr_default.getStatus(0) != 101) ) && ( ( ( 10 == 0 ) || ( GRID1_nCurrentRecord < subGrid1_Recordsperpage( ) ) ) ) )
            {
               A10UserEnderecoNumero = H000E2_A10UserEnderecoNumero[0];
               A8UserCel = H000E2_A8UserCel[0];
               A7UserTel = H000E2_A7UserTel[0];
               A6UserCPF = H000E2_A6UserCPF[0];
               A5UserRG = H000E2_A5UserRG[0];
               A4UserElevacao = H000E2_A4UserElevacao[0];
               A3UserIniciacao = H000E2_A3UserIniciacao[0];
               A1UserCID = H000E2_A1UserCID[0];
               A43UserId = H000E2_A43UserId[0];
               /* Execute user event: E120E2 */
               E120E2 ();
               pr_default.readNext(0);
            }
            GRID1_nEOF = (short)(((pr_default.getStatus(0) == 101) ? 1 : 0));
            pr_default.close(0);
            wbEnd = 51;
            WB0E0( ) ;
         }
      }

      protected int subGrid1_Pagecount( )
      {
         GRID1_nRecordCount = subGrid1_Recordcount( );
         if ( (int)(GRID1_nRecordCount % (subGrid1_Recordsperpage( ))) == 0 )
         {
            return (int)(NumberUtil.Int( (long)(GRID1_nRecordCount/ (decimal)(subGrid1_Recordsperpage( ))))) ;
         }
         return (int)(NumberUtil.Int( (long)(GRID1_nRecordCount/ (decimal)(subGrid1_Recordsperpage( ))))+1) ;
      }

      protected int subGrid1_Recordcount( )
      {
         pr_default.dynParam(1, new Object[]{ new Object[]{
                                              AV7cUserCID ,
                                              AV8cUserIniciacao ,
                                              AV9cUserElevacao ,
                                              AV10cUserRG ,
                                              AV11cUserCPF ,
                                              AV12cUserTel ,
                                              A1UserCID ,
                                              A3UserIniciacao ,
                                              A4UserElevacao ,
                                              A5UserRG ,
                                              A6UserCPF ,
                                              A7UserTel ,
                                              AV6cUserId },
                                              new int[] {
                                              TypeConstants.INT, TypeConstants.DATE, TypeConstants.DATE, TypeConstants.STRING, TypeConstants.LONG, TypeConstants.STRING, TypeConstants.INT, TypeConstants.DATE, TypeConstants.DATE, TypeConstants.STRING,
                                              TypeConstants.LONG, TypeConstants.STRING, TypeConstants.LONG
                                              }
         });
         lV10cUserRG = StringUtil.PadR( StringUtil.RTrim( AV10cUserRG), 12, "%");
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV10cUserRG", AV10cUserRG);
         lV12cUserTel = StringUtil.PadR( StringUtil.RTrim( AV12cUserTel), 14, "%");
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV12cUserTel", AV12cUserTel);
         /* Using cursor H000E3 */
         pr_default.execute(1, new Object[] {AV6cUserId, AV7cUserCID, AV8cUserIniciacao, AV9cUserElevacao, lV10cUserRG, AV11cUserCPF, lV12cUserTel});
         GRID1_nRecordCount = H000E3_AGRID1_nRecordCount[0];
         pr_default.close(1);
         return GRID1_nRecordCount ;
      }

      protected int subGrid1_Recordsperpage( )
      {
         return (int)(10*1) ;
      }

      protected int subGrid1_Currentpage( )
      {
         return (int)(NumberUtil.Int( (long)(GRID1_nFirstRecordOnPage/ (decimal)(subGrid1_Recordsperpage( ))))+1) ;
      }

      protected short subgrid1_firstpage( )
      {
         GRID1_nFirstRecordOnPage = 0;
         return 0 ;
      }

      protected short subgrid1_nextpage( )
      {
         GRID1_nRecordCount = subGrid1_Recordcount( );
         if ( ( GRID1_nRecordCount >= subGrid1_Recordsperpage( ) ) && ( GRID1_nEOF == 0 ) )
         {
            GRID1_nFirstRecordOnPage = (int)(GRID1_nFirstRecordOnPage+subGrid1_Recordsperpage( ));
         }
         else
         {
            return 2 ;
         }
         return 0 ;
      }

      protected short subgrid1_previouspage( )
      {
         if ( GRID1_nFirstRecordOnPage >= subGrid1_Recordsperpage( ) )
         {
            GRID1_nFirstRecordOnPage = (int)(GRID1_nFirstRecordOnPage-subGrid1_Recordsperpage( ));
         }
         else
         {
            return 2 ;
         }
         return 0 ;
      }

      protected short subgrid1_lastpage( )
      {
         GRID1_nRecordCount = subGrid1_Recordcount( );
         if ( GRID1_nRecordCount > subGrid1_Recordsperpage( ) )
         {
            if ( (int)(GRID1_nRecordCount % (subGrid1_Recordsperpage( ))) == 0 )
            {
               GRID1_nFirstRecordOnPage = (int)(GRID1_nRecordCount-subGrid1_Recordsperpage( ));
            }
            else
            {
               GRID1_nFirstRecordOnPage = (int)(GRID1_nRecordCount-(int)(GRID1_nRecordCount % (subGrid1_Recordsperpage( ))));
            }
         }
         else
         {
            GRID1_nFirstRecordOnPage = 0;
         }
         return 0 ;
      }

      protected int subgrid1_gotopage( int nPageNo )
      {
         if ( nPageNo > 0 )
         {
            GRID1_nFirstRecordOnPage = (int)(subGrid1_Recordsperpage( )*(nPageNo-1));
         }
         else
         {
            GRID1_nFirstRecordOnPage = 0;
         }
         return (int)(0) ;
      }

      protected void STRUP0E0( )
      {
         /* Before Start, stand alone formulas. */
         context.Gx_err = 0;
         /* Execute Start event if defined. */
         context.wbGlbDoneStart = 0;
         /* Execute user event: E110E2 */
         E110E2 ();
         context.wbGlbDoneStart = 1;
         /* After Start, stand alone formulas. */
         if ( StringUtil.StrCmp(context.GetRequestMethod( ), "POST") == 0 )
         {
            /* Read saved SDTs. */
            /* Read variables values. */
            if ( ( ( context.localUtil.CToN( cgiGet( edtavCuserid_Internalname), ".", ",") < Convert.ToDecimal( 0 )) ) || ( ( context.localUtil.CToN( cgiGet( edtavCuserid_Internalname), ".", ",") > Convert.ToDecimal( 999999999999999L )) ) )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_badnum", ""), 1, "vCUSERID");
               GX_FocusControl = edtavCuserid_Internalname;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
               wbErr = true;
               AV6cUserId = 0;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV6cUserId", StringUtil.LTrim( StringUtil.Str( (decimal)(AV6cUserId), 15, 0)));
            }
            else
            {
               AV6cUserId = (long)(context.localUtil.CToN( cgiGet( edtavCuserid_Internalname), ".", ","));
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV6cUserId", StringUtil.LTrim( StringUtil.Str( (decimal)(AV6cUserId), 15, 0)));
            }
            if ( ( ( context.localUtil.CToN( cgiGet( edtavCusercid_Internalname), ".", ",") < Convert.ToDecimal( 0 )) ) || ( ( context.localUtil.CToN( cgiGet( edtavCusercid_Internalname), ".", ",") > Convert.ToDecimal( 999999 )) ) )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_badnum", ""), 1, "vCUSERCID");
               GX_FocusControl = edtavCusercid_Internalname;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
               wbErr = true;
               AV7cUserCID = 0;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV7cUserCID", StringUtil.LTrim( StringUtil.Str( (decimal)(AV7cUserCID), 6, 0)));
            }
            else
            {
               AV7cUserCID = (int)(context.localUtil.CToN( cgiGet( edtavCusercid_Internalname), ".", ","));
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV7cUserCID", StringUtil.LTrim( StringUtil.Str( (decimal)(AV7cUserCID), 6, 0)));
            }
            if ( context.localUtil.VCDate( cgiGet( edtavCuseriniciacao_Internalname), 1) == 0 )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_faildate", new   object[]  {"User Iniciacao"}), 1, "vCUSERINICIACAO");
               GX_FocusControl = edtavCuseriniciacao_Internalname;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
               wbErr = true;
               AV8cUserIniciacao = DateTime.MinValue;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV8cUserIniciacao", context.localUtil.Format(AV8cUserIniciacao, "99/99/9999"));
            }
            else
            {
               AV8cUserIniciacao = context.localUtil.CToD( cgiGet( edtavCuseriniciacao_Internalname), 1);
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV8cUserIniciacao", context.localUtil.Format(AV8cUserIniciacao, "99/99/9999"));
            }
            if ( context.localUtil.VCDate( cgiGet( edtavCuserelevacao_Internalname), 1) == 0 )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_faildate", new   object[]  {"User Elevacao"}), 1, "vCUSERELEVACAO");
               GX_FocusControl = edtavCuserelevacao_Internalname;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
               wbErr = true;
               AV9cUserElevacao = DateTime.MinValue;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV9cUserElevacao", context.localUtil.Format(AV9cUserElevacao, "99/99/9999"));
            }
            else
            {
               AV9cUserElevacao = context.localUtil.CToD( cgiGet( edtavCuserelevacao_Internalname), 1);
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV9cUserElevacao", context.localUtil.Format(AV9cUserElevacao, "99/99/9999"));
            }
            AV10cUserRG = cgiGet( edtavCuserrg_Internalname);
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV10cUserRG", AV10cUserRG);
            if ( ( ( context.localUtil.CToN( cgiGet( edtavCusercpf_Internalname), ".", ",") < Convert.ToDecimal( 0 )) ) || ( ( context.localUtil.CToN( cgiGet( edtavCusercpf_Internalname), ".", ",") > Convert.ToDecimal( 99999999999L )) ) )
            {
               GX_msglist.addItem(context.GetMessage( "GXM_badnum", ""), 1, "vCUSERCPF");
               GX_FocusControl = edtavCusercpf_Internalname;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "GX_FocusControl", GX_FocusControl);
               wbErr = true;
               AV11cUserCPF = 0;
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV11cUserCPF", StringUtil.LTrim( StringUtil.Str( (decimal)(AV11cUserCPF), 11, 0)));
            }
            else
            {
               AV11cUserCPF = (long)(context.localUtil.CToN( cgiGet( edtavCusercpf_Internalname), ".", ","));
               context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV11cUserCPF", StringUtil.LTrim( StringUtil.Str( (decimal)(AV11cUserCPF), 11, 0)));
            }
            AV12cUserTel = cgiGet( edtavCusertel_Internalname);
            context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV12cUserTel", AV12cUserTel);
            /* Read saved values. */
            nRC_Grid1 = (short)(context.localUtil.CToN( cgiGet( "nRC_Grid1"), ".", ","));
            AV13pUserId = (long)(context.localUtil.CToN( cgiGet( "vPUSERID"), ".", ","));
            GRID1_nFirstRecordOnPage = (int)(context.localUtil.CToN( cgiGet( "GRID1_nFirstRecordOnPage"), ".", ","));
            GRID1_nEOF = (short)(context.localUtil.CToN( cgiGet( "GRID1_nEOF"), ".", ","));
            /* Read subfile selected row values. */
            /* Read hidden variables. */
            GXKey = Crypto.Decrypt64( context.GetCookie( "GX_SESSION_ID"), Crypto.GetServerKey( ));
            /* Check if conditions changed and reset current page numbers */
            if ( ( context.localUtil.CToN( cgiGet( "GXH_vCUSERID"), ".", ",") != Convert.ToDecimal( AV6cUserId )) )
            {
               GRID1_nFirstRecordOnPage = 0;
            }
            if ( ( context.localUtil.CToN( cgiGet( "GXH_vCUSERCID"), ".", ",") != Convert.ToDecimal( AV7cUserCID )) )
            {
               GRID1_nFirstRecordOnPage = 0;
            }
            if ( context.localUtil.CToD( cgiGet( "GXH_vCUSERINICIACAO"), 1) != AV8cUserIniciacao )
            {
               GRID1_nFirstRecordOnPage = 0;
            }
            if ( context.localUtil.CToD( cgiGet( "GXH_vCUSERELEVACAO"), 1) != AV9cUserElevacao )
            {
               GRID1_nFirstRecordOnPage = 0;
            }
            if ( StringUtil.StrCmp(cgiGet( "GXH_vCUSERRG"), AV10cUserRG) != 0 )
            {
               GRID1_nFirstRecordOnPage = 0;
            }
            if ( ( context.localUtil.CToN( cgiGet( "GXH_vCUSERCPF"), ".", ",") != Convert.ToDecimal( AV11cUserCPF )) )
            {
               GRID1_nFirstRecordOnPage = 0;
            }
            if ( StringUtil.StrCmp(cgiGet( "GXH_vCUSERTEL"), AV12cUserTel) != 0 )
            {
               GRID1_nFirstRecordOnPage = 0;
            }
         }
         else
         {
            dynload_actions( ) ;
         }
      }

      protected void GXStart( )
      {
         /* Execute user event: E110E2 */
         E110E2 ();
         if ( returnInSub )
         {
            returnInSub = true;
            if (true) return;
         }
      }

      protected void E110E2( )
      {
         /* Start Routine */
         Form.Caption = StringUtil.Format( "Selection List %1", "User", "", "", "", "", "", "", "", "");
         context.httpAjaxContext.ajax_rsp_assign_prop("", false, "FORM", "Caption", Form.Caption);
      }

      private void E120E2( )
      {
         /* Load Routine */
         AV5LinkSelection = context.GetImagePath( "3914535b-0c03-44c5-9538-906a99cdd2bc", "", context.GetTheme( ));
         AV16Linkselection_GXI = GeneXus.Utils.GXDbFile.PathToUrl( context.GetImagePath( "3914535b-0c03-44c5-9538-906a99cdd2bc", "", context.GetTheme( )));
         sendrow_512( ) ;
         GRID1_nCurrentRecord = (int)(GRID1_nCurrentRecord+1);
      }

      public void GXEnter( )
      {
         /* Execute user event: E130E2 */
         E130E2 ();
         if ( returnInSub )
         {
            returnInSub = true;
            if (true) return;
         }
      }

      protected void E130E2( )
      {
         /* Enter Routine */
         AV13pUserId = A43UserId;
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV13pUserId", StringUtil.LTrim( StringUtil.Str( (decimal)(AV13pUserId), 15, 0)));
         context.setWebReturnParms(new Object[] {(long)AV13pUserId});
         context.wjLocDisableFrm = 1;
         context.nUserReturn = 1;
         returnInSub = true;
         if (true) return;
      }

      protected void wb_table1_2_0E2( bool wbgen )
      {
         if ( wbgen )
         {
            /* Table start */
            sStyleString = "";
            GxWebStd.gx_table_start( context, tblTable1_Internalname, tblTable1_Internalname, "", "Table", 0, "", "", 1, 2, sStyleString, "", 0);
            context.WriteHtmlText( "<tbody>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td data-align=\"center\"  style=\"text-align:-khtml-center;text-align:-moz-center;text-align:-webkit-center\">") ;
            ClassString = "ErrorViewer";
            StyleString = "";
            GxWebStd.gx_msg_list( context, "", context.GX_msglist.DisplayMode, StyleString, ClassString, "", "false");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            /* Control Group */
            ClassString = "FieldSet";
            StyleString = "";
            context.WriteHtmlText( "<fieldset id=\""+grpGroup1_Internalname+"\""+" style=\"-moz-border-radius:3pt;\""+" class=\""+ClassString+"\">") ;
            context.WriteHtmlText( "<legend class=\""+ClassString+"Title"+"\">"+"Filters"+"</legend>") ;
            wb_table2_9_0E2( true) ;
         }
         else
         {
            wb_table2_9_0E2( false) ;
         }
         return  ;
      }

      protected void wb_table2_9_0E2e( bool wbgen )
      {
         if ( wbgen )
         {
            context.WriteHtmlText( "</fieldset>") ;
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            /* Control Group */
            ClassString = "FieldSet";
            StyleString = "";
            context.WriteHtmlText( "<fieldset id=\""+grpGroup2_Internalname+"\""+" style=\"-moz-border-radius:3pt;\""+" class=\""+ClassString+"\">") ;
            context.WriteHtmlText( "<legend class=\""+ClassString+"Title"+"\">"+"Selection List"+"</legend>") ;
            wb_table3_48_0E2( true) ;
         }
         else
         {
            wb_table3_48_0E2( false) ;
         }
         return  ;
      }

      protected void wb_table3_48_0E2e( bool wbgen )
      {
         if ( wbgen )
         {
            context.WriteHtmlText( "</fieldset>") ;
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "</tbody>") ;
            /* End of table */
            context.WriteHtmlText( "</table>") ;
            wb_table1_2_0E2e( true) ;
         }
         else
         {
            wb_table1_2_0E2e( false) ;
         }
      }

      protected void wb_table3_48_0E2( bool wbgen )
      {
         if ( wbgen )
         {
            /* Table start */
            sStyleString = "";
            GxWebStd.gx_table_start( context, tblTable3_Internalname, tblTable3_Internalname, "", "Table", 0, "", "", 1, 2, sStyleString, "", 0);
            context.WriteHtmlText( "<tbody>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td colspan=\"3\" >") ;
            /*  Grid Control  */
            Grid1Container.SetWrapped(nGXWrapped);
            if ( Grid1Container.GetWrapped() == 1 )
            {
               context.WriteHtmlText( "<div id=\""+"Grid1Container"+"DivS\" gxgridid=\"51\">") ;
               sStyleString = "";
               GxWebStd.gx_table_start( context, subGrid1_Internalname, subGrid1_Internalname, "", "Grid", 0, "", "", 1, 0, sStyleString, "", 0);
               /* Subfile titles */
               context.WriteHtmlText( "<tr") ;
               context.WriteHtmlTextNl( ">") ;
               if ( subGrid1_Backcolorstyle == 0 )
               {
                  subGrid1_Titlebackstyle = 0;
                  if ( StringUtil.Len( subGrid1_Class) > 0 )
                  {
                     subGrid1_Linesclass = subGrid1_Class+"Title";
                  }
               }
               else
               {
                  subGrid1_Titlebackstyle = 1;
                  if ( subGrid1_Backcolorstyle == 1 )
                  {
                     subGrid1_Titlebackcolor = subGrid1_Allbackcolor;
                     if ( StringUtil.Len( subGrid1_Class) > 0 )
                     {
                        subGrid1_Linesclass = subGrid1_Class+"UniformTitle";
                     }
                  }
                  else
                  {
                     if ( StringUtil.Len( subGrid1_Class) > 0 )
                     {
                        subGrid1_Linesclass = subGrid1_Class+"Title";
                     }
                  }
               }
               context.WriteHtmlText( "<th align=\""+""+"\" "+" nowrap=\"nowrap\" "+" class=\""+subGrid1_Linesclass+"\" "+" style=\""+((-1==0) ? "display:none;" : "")+""+"\" "+">") ;
               context.SendWebValue( "") ;
               context.WriteHtmlTextNl( "</th>") ;
               context.WriteHtmlText( "<th align=\""+"right"+"\" "+" nowrap=\"nowrap\" "+" class=\""+subGrid1_Linesclass+"\" "+" style=\""+((-1==0) ? "display:none;" : "")+""+"\" "+">") ;
               context.SendWebValue( "Usuario Id") ;
               context.WriteHtmlTextNl( "</th>") ;
               context.WriteHtmlText( "<th align=\""+"right"+"\" "+" nowrap=\"nowrap\" "+" class=\""+subGrid1_Linesclass+"\" "+" style=\""+((-1==0) ? "display:none;" : "")+""+"\" "+">") ;
               context.SendWebValue( "CID") ;
               context.WriteHtmlTextNl( "</th>") ;
               context.WriteHtmlText( "<th align=\""+"right"+"\" "+" nowrap=\"nowrap\" "+" class=\""+subGrid1_Linesclass+"\" "+" style=\""+((-1==0) ? "display:none;" : "")+""+"\" "+">") ;
               context.SendWebValue( "Iniciacao") ;
               context.WriteHtmlTextNl( "</th>") ;
               context.WriteHtmlText( "<th align=\""+"right"+"\" "+" nowrap=\"nowrap\" "+" class=\""+subGrid1_Linesclass+"\" "+" style=\""+((-1==0) ? "display:none;" : "")+""+"\" "+">") ;
               context.SendWebValue( "Elevacao") ;
               context.WriteHtmlTextNl( "</th>") ;
               context.WriteHtmlText( "<th align=\""+"left"+"\" "+" nowrap=\"nowrap\" "+" class=\""+subGrid1_Linesclass+"\" "+" style=\""+((-1==0) ? "display:none;" : "")+""+"\" "+">") ;
               context.SendWebValue( "RG") ;
               context.WriteHtmlTextNl( "</th>") ;
               context.WriteHtmlText( "<th align=\""+"left"+"\" "+" nowrap=\"nowrap\" "+" class=\""+subGrid1_Linesclass+"\" "+" style=\""+((-1==0) ? "display:none;" : "")+""+"\" "+">") ;
               context.SendWebValue( "CPF") ;
               context.WriteHtmlTextNl( "</th>") ;
               context.WriteHtmlText( "<th align=\""+"left"+"\" "+" nowrap=\"nowrap\" "+" class=\""+subGrid1_Linesclass+"\" "+" style=\""+((-1==0) ? "display:none;" : "")+""+"\" "+">") ;
               context.SendWebValue( "Tel") ;
               context.WriteHtmlTextNl( "</th>") ;
               context.WriteHtmlText( "<th align=\""+"left"+"\" "+" nowrap=\"nowrap\" "+" class=\""+subGrid1_Linesclass+"\" "+" style=\""+((-1==0) ? "display:none;" : "")+""+"\" "+">") ;
               context.SendWebValue( "Cel") ;
               context.WriteHtmlTextNl( "</th>") ;
               context.WriteHtmlText( "<th align=\""+"right"+"\" "+" nowrap=\"nowrap\" "+" class=\""+subGrid1_Linesclass+"\" "+" style=\""+((-1==0) ? "display:none;" : "")+""+"\" "+">") ;
               context.SendWebValue( "Endereco Numero") ;
               context.WriteHtmlTextNl( "</th>") ;
               context.WriteHtmlTextNl( "</tr>") ;
               Grid1Container.AddObjectProperty("GridName", "Grid1");
            }
            else
            {
               if ( isAjaxCallMode( ) )
               {
                  Grid1Container = new GXWebGrid( context);
               }
               else
               {
                  Grid1Container.Clear();
               }
               Grid1Container.SetWrapped(nGXWrapped);
               Grid1Container.AddObjectProperty("GridName", "Grid1");
               Grid1Container.AddObjectProperty("Class", "Grid");
               Grid1Container.AddObjectProperty("Cellpadding", StringUtil.LTrim( StringUtil.NToC( (decimal)(1), 4, 0, ".", "")));
               Grid1Container.AddObjectProperty("Cellspacing", StringUtil.LTrim( StringUtil.NToC( (decimal)(0), 4, 0, ".", "")));
               Grid1Container.AddObjectProperty("Backcolorstyle", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGrid1_Backcolorstyle), 1, 0, ".", "")));
               Grid1Container.AddObjectProperty("CmpContext", "");
               Grid1Container.AddObjectProperty("InMasterPage", "false");
               Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( ));
               Grid1Column.AddObjectProperty("Value", context.convertURL( AV5LinkSelection));
               Grid1Column.AddObjectProperty("Link", StringUtil.RTrim( edtavLinkselection_Link));
               Grid1Container.AddColumnProperties(Grid1Column);
               Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( ));
               Grid1Column.AddObjectProperty("Value", StringUtil.LTrim( StringUtil.NToC( (decimal)(A43UserId), 15, 0, ".", "")));
               Grid1Column.AddObjectProperty("Link", StringUtil.RTrim( edtUserId_Link));
               Grid1Container.AddColumnProperties(Grid1Column);
               Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( ));
               Grid1Column.AddObjectProperty("Value", StringUtil.LTrim( StringUtil.NToC( (decimal)(A1UserCID), 6, 0, ".", "")));
               Grid1Container.AddColumnProperties(Grid1Column);
               Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( ));
               Grid1Column.AddObjectProperty("Value", context.localUtil.Format(A3UserIniciacao, "99/99/9999"));
               Grid1Container.AddColumnProperties(Grid1Column);
               Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( ));
               Grid1Column.AddObjectProperty("Value", context.localUtil.Format(A4UserElevacao, "99/99/9999"));
               Grid1Container.AddColumnProperties(Grid1Column);
               Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( ));
               Grid1Column.AddObjectProperty("Value", StringUtil.RTrim( A5UserRG));
               Grid1Container.AddColumnProperties(Grid1Column);
               Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( ));
               Grid1Column.AddObjectProperty("Value", StringUtil.LTrim( StringUtil.NToC( (decimal)(A6UserCPF), 11, 0, ".", "")));
               Grid1Container.AddColumnProperties(Grid1Column);
               Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( ));
               Grid1Column.AddObjectProperty("Value", StringUtil.RTrim( A7UserTel));
               Grid1Container.AddColumnProperties(Grid1Column);
               Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( ));
               Grid1Column.AddObjectProperty("Value", StringUtil.RTrim( A8UserCel));
               Grid1Container.AddColumnProperties(Grid1Column);
               Grid1Column = GXWebColumn.GetNew(isAjaxCallMode( ));
               Grid1Column.AddObjectProperty("Value", StringUtil.LTrim( StringUtil.NToC( (decimal)(A10UserEnderecoNumero), 5, 0, ".", "")));
               Grid1Container.AddColumnProperties(Grid1Column);
               Grid1Container.AddObjectProperty("Allowselection", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGrid1_Allowselection), 1, 0, ".", "")));
               Grid1Container.AddObjectProperty("Selectioncolor", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGrid1_Selectioncolor), 9, 0, ".", "")));
               Grid1Container.AddObjectProperty("Allowhover", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGrid1_Allowhovering), 1, 0, ".", "")));
               Grid1Container.AddObjectProperty("Hovercolor", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGrid1_Hoveringcolor), 9, 0, ".", "")));
               Grid1Container.AddObjectProperty("Allowcollapsing", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGrid1_Allowcollapsing), 1, 0, ".", "")));
               Grid1Container.AddObjectProperty("Collapsed", StringUtil.LTrim( StringUtil.NToC( (decimal)(subGrid1_Collapsed), 1, 0, ".", "")));
            }
         }
         if ( wbEnd == 51 )
         {
            wbEnd = 0;
            nRC_Grid1 = (short)(nGXsfl_51_idx-1);
            if ( Grid1Container.GetWrapped() == 1 )
            {
               context.WriteHtmlText( "</table>") ;
               context.WriteHtmlText( "</div>") ;
            }
            else
            {
               Grid1Container.AddObjectProperty("GRID1_nEOF", GRID1_nEOF);
               Grid1Container.AddObjectProperty("GRID1_nFirstRecordOnPage", GRID1_nFirstRecordOnPage);
               sStyleString = " style=\"display:none;\"";
               sStyleString = "";
               context.WriteHtmlText( "<div id=\""+"Grid1Container"+"Div\" "+sStyleString+">"+"</div>") ;
               context.httpAjaxContext.ajax_rsp_assign_grid("_"+"Grid1", (Object)(Grid1Container));
               if ( ! context.isAjaxRequest( ) )
               {
                  GxWebStd.gx_hidden_field( context, "Grid1ContainerData", Grid1Container.ToJavascriptSource());
               }
               if ( context.isAjaxRequest( ) )
               {
                  GxWebStd.gx_hidden_field( context, "Grid1ContainerData"+"V", Grid1Container.GridValuesHidden());
               }
               else
               {
                  context.WriteHtmlText( "<input type=\"hidden\" "+"name=\""+"Grid1ContainerData"+"V"+"\" value='"+Grid1Container.GridValuesHidden()+"'/>") ;
               }
            }
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td data-align=\"right\"  style=\"text-align:-khtml-right;text-align:-moz-right;text-align:-webkit-right\">") ;
            wb_table4_64_0E2( true) ;
         }
         else
         {
            wb_table4_64_0E2( false) ;
         }
         return  ;
      }

      protected void wb_table4_64_0E2e( bool wbgen )
      {
         if ( wbgen )
         {
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "</tbody>") ;
            /* End of table */
            context.WriteHtmlText( "</table>") ;
            wb_table3_48_0E2e( true) ;
         }
         else
         {
            wb_table3_48_0E2e( false) ;
         }
      }

      protected void wb_table4_64_0E2( bool wbgen )
      {
         if ( wbgen )
         {
            /* Table start */
            sStyleString = "";
            GxWebStd.gx_table_start( context, tblTable4_Internalname, tblTable4_Internalname, "", "Table", 0, "", "", 1, 2, sStyleString, "", 0);
            context.WriteHtmlText( "<tbody>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 67,'',false,'',0)\"";
            ClassString = "BtnCancel";
            StyleString = "";
            GxWebStd.gx_button_ctrl( context, bttBtn_cancel_Internalname, "gx.evt.setGridEvt("+StringUtil.Str( (decimal)(51), 2, 0)+","+"null"+");", "Cancel", bttBtn_cancel_Jsonclick, 1, "Cancel", "", StyleString, ClassString, 1, 1, "standard", "ECANCEL.", TempTags, "", context.GetButtonType( ), "HLP_Gx0010.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "</tbody>") ;
            /* End of table */
            context.WriteHtmlText( "</table>") ;
            wb_table4_64_0E2e( true) ;
         }
         else
         {
            wb_table4_64_0E2e( false) ;
         }
      }

      protected void wb_table2_9_0E2( bool wbgen )
      {
         if ( wbgen )
         {
            /* Table start */
            sStyleString = "";
            GxWebStd.gx_table_start( context, tblTable2_Internalname, tblTable2_Internalname, "", "Table", 0, "", "", 1, 2, sStyleString, "", 0);
            context.WriteHtmlText( "<tbody>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            /* Text block */
            ClassString = "TextBlock";
            StyleString = "";
            GxWebStd.gx_label_ctrl( context, lblTextblockuserid_Internalname, "UserId", "", "", lblTextblockuserid_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_Gx0010.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 14,'',false,'" + sGXsfl_51_idx + "',0)\"";
            ClassString = "Attribute";
            StyleString = "";
            GxWebStd.gx_single_line_edit( context, edtavCuserid_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(AV6cUserId), 15, 0, ".", "")), ((1!=0) ? StringUtil.LTrim( context.localUtil.Format( (decimal)(AV6cUserId), "ZZZZZZZZZZZZZZ9")) : context.localUtil.Format( (decimal)(AV6cUserId), "ZZZZZZZZZZZZZZ9")), TempTags+" onchange=\"gx.evt.onchange(this)\" "+" onblur=\""+"gx.num.valid_integer( this,',');"+";gx.evt.onblur(14);\"", "", "", "", "", "", edtavCuserid_Jsonclick, 0, ClassString, StyleString, "", 1, 1, 0, "text", "", 15, "chr", 1, "row", 15, 0, 0, 0, 1, -1, 0, true, "", "right", "HLP_Gx0010.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            /* Text block */
            ClassString = "TextBlock";
            StyleString = "";
            GxWebStd.gx_label_ctrl( context, lblTextblockusercid_Internalname, "User CID", "", "", lblTextblockusercid_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_Gx0010.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 19,'',false,'" + sGXsfl_51_idx + "',0)\"";
            ClassString = "Attribute";
            StyleString = "";
            GxWebStd.gx_single_line_edit( context, edtavCusercid_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(AV7cUserCID), 6, 0, ".", "")), ((1!=0) ? StringUtil.LTrim( context.localUtil.Format( (decimal)(AV7cUserCID), "ZZZZZZ")) : context.localUtil.Format( (decimal)(AV7cUserCID), "ZZZZZZ")), TempTags+" onchange=\"gx.evt.onchange(this)\" "+" onblur=\""+"gx.num.valid_integer( this,',');"+";gx.evt.onblur(19);\"", "", "", "", "", "", edtavCusercid_Jsonclick, 0, ClassString, StyleString, "", 1, 1, 0, "text", "", 6, "chr", 1, "row", 6, 0, 0, 0, 1, -1, 0, true, "", "right", "HLP_Gx0010.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            /* Text block */
            ClassString = "TextBlock";
            StyleString = "";
            GxWebStd.gx_label_ctrl( context, lblTextblockuseriniciacao_Internalname, "User Iniciacao", "", "", lblTextblockuseriniciacao_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_Gx0010.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 24,'',false,'" + sGXsfl_51_idx + "',0)\"";
            ClassString = "Attribute";
            StyleString = "";
            context.WriteHtmlText( "<div id=\""+edtavCuseriniciacao_Internalname+"_dp_container\" class=\"dp_container\" style=\"white-space:nowrap;display:inline;\">") ;
            GxWebStd.gx_single_line_edit( context, edtavCuseriniciacao_Internalname, context.localUtil.Format(AV8cUserIniciacao, "99/99/9999"), context.localUtil.Format( AV8cUserIniciacao, "99/99/9999"), TempTags+" onchange=\"gx.evt.onchange(this)\" "+" onblur=\""+"gx.date.valid_date(this, 10,'MDY',0,12,'eng',false,0);"+";gx.evt.onblur(24);\"", "", "", "", "", "", edtavCuseriniciacao_Jsonclick, 0, ClassString, StyleString, "", 1, 1, 0, "text", "", 10, "chr", 1, "row", 10, 0, 0, 0, 1, -1, 0, true, "", "right", "HLP_Gx0010.htm");
            GxWebStd.gx_bitmap( context, edtavCuseriniciacao_Internalname+"_dp_trigger", context.GetImagePath( "61b9b5d3-dff6-4d59-9b00-da61bc2cbe93", "", context.GetTheme( )), "", "", "", "", ((1==0)||(1==0) ? 0 : 1), 0, "Date selector", "Date selector", 0, 1, 0, "", 0, "", 0, 0, 0, "", "", "cursor: pointer;vertical-align:text-bottom", "", "", "", "", "", "", 1, false, false, "HLP_Gx0010.htm");
            context.WriteHtmlTextNl( "</div>") ;
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            /* Text block */
            ClassString = "TextBlock";
            StyleString = "";
            GxWebStd.gx_label_ctrl( context, lblTextblockuserelevacao_Internalname, "User Elevacao", "", "", lblTextblockuserelevacao_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_Gx0010.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 29,'',false,'" + sGXsfl_51_idx + "',0)\"";
            ClassString = "Attribute";
            StyleString = "";
            context.WriteHtmlText( "<div id=\""+edtavCuserelevacao_Internalname+"_dp_container\" class=\"dp_container\" style=\"white-space:nowrap;display:inline;\">") ;
            GxWebStd.gx_single_line_edit( context, edtavCuserelevacao_Internalname, context.localUtil.Format(AV9cUserElevacao, "99/99/9999"), context.localUtil.Format( AV9cUserElevacao, "99/99/9999"), TempTags+" onchange=\"gx.evt.onchange(this)\" "+" onblur=\""+"gx.date.valid_date(this, 10,'MDY',0,12,'eng',false,0);"+";gx.evt.onblur(29);\"", "", "", "", "", "", edtavCuserelevacao_Jsonclick, 0, ClassString, StyleString, "", 1, 1, 0, "text", "", 10, "chr", 1, "row", 10, 0, 0, 0, 1, -1, 0, true, "", "right", "HLP_Gx0010.htm");
            GxWebStd.gx_bitmap( context, edtavCuserelevacao_Internalname+"_dp_trigger", context.GetImagePath( "61b9b5d3-dff6-4d59-9b00-da61bc2cbe93", "", context.GetTheme( )), "", "", "", "", ((1==0)||(1==0) ? 0 : 1), 0, "Date selector", "Date selector", 0, 1, 0, "", 0, "", 0, 0, 0, "", "", "cursor: pointer;vertical-align:text-bottom", "", "", "", "", "", "", 1, false, false, "HLP_Gx0010.htm");
            context.WriteHtmlTextNl( "</div>") ;
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            /* Text block */
            ClassString = "TextBlock";
            StyleString = "";
            GxWebStd.gx_label_ctrl( context, lblTextblockuserrg_Internalname, "User RG", "", "", lblTextblockuserrg_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_Gx0010.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 34,'',false,'" + sGXsfl_51_idx + "',0)\"";
            ClassString = "Attribute";
            StyleString = "";
            GxWebStd.gx_single_line_edit( context, edtavCuserrg_Internalname, StringUtil.RTrim( AV10cUserRG), StringUtil.RTrim( context.localUtil.Format( AV10cUserRG, "")), TempTags+" onchange=\"gx.evt.onchange(this)\" "+" onblur=\""+""+";gx.evt.onblur(34);\"", "", "", "", "", "", edtavCuserrg_Jsonclick, 0, ClassString, StyleString, "", 1, 1, 0, "text", "", 12, "chr", 1, "row", 12, 0, 0, 0, 1, -1, -1, true, "", "left", "HLP_Gx0010.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            /* Text block */
            ClassString = "TextBlock";
            StyleString = "";
            GxWebStd.gx_label_ctrl( context, lblTextblockusercpf_Internalname, "User CPF", "", "", lblTextblockusercpf_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_Gx0010.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 39,'',false,'" + sGXsfl_51_idx + "',0)\"";
            ClassString = "Attribute";
            StyleString = "";
            GxWebStd.gx_single_line_edit( context, edtavCusercpf_Internalname, StringUtil.LTrim( StringUtil.NToC( (decimal)(AV11cUserCPF), 11, 0, ".", "")), ((1!=0) ? StringUtil.LTrim( context.localUtil.Format( (decimal)(AV11cUserCPF), "ZZZZZZZZZZZ")) : context.localUtil.Format( (decimal)(AV11cUserCPF), "ZZZZZZZZZZZ")), TempTags+" onchange=\"gx.evt.onchange(this)\" "+" onblur=\""+"gx.num.valid_integer( this,',');"+";gx.evt.onblur(39);\"", "", "", "", "", "", edtavCusercpf_Jsonclick, 0, ClassString, StyleString, "", 1, 1, 0, "text", "", 11, "chr", 1, "row", 11, 0, 0, 0, 1, -1, 0, true, "", "left", "HLP_Gx0010.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "<tr>") ;
            context.WriteHtmlText( "<td>") ;
            /* Text block */
            ClassString = "TextBlock";
            StyleString = "";
            GxWebStd.gx_label_ctrl( context, lblTextblockusertel_Internalname, "User Tel", "", "", lblTextblockusertel_Jsonclick, "", StyleString, ClassString, 0, "", 1, 1, 0, "HLP_Gx0010.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "<td>") ;
            /* Single line edit */
            TempTags = "  onfocus=\"gx.evt.onfocus(this, 44,'',false,'" + sGXsfl_51_idx + "',0)\"";
            ClassString = "Attribute";
            StyleString = "";
            GxWebStd.gx_single_line_edit( context, edtavCusertel_Internalname, StringUtil.RTrim( AV12cUserTel), StringUtil.RTrim( context.localUtil.Format( AV12cUserTel, "")), TempTags+" onchange=\"gx.evt.onchange(this)\" "+" onblur=\""+""+";gx.evt.onblur(44);\"", "", "", "", "", "", edtavCusertel_Jsonclick, 0, ClassString, StyleString, "", 1, 1, 0, "text", "", 14, "chr", 1, "row", 14, 0, 0, 0, 1, -1, -1, true, "", "left", "HLP_Gx0010.htm");
            context.WriteHtmlText( "</td>") ;
            context.WriteHtmlText( "</tr>") ;
            context.WriteHtmlText( "</tbody>") ;
            /* End of table */
            context.WriteHtmlText( "</table>") ;
            wb_table2_9_0E2e( true) ;
         }
         else
         {
            wb_table2_9_0E2e( false) ;
         }
      }

      public override void setparameters( Object[] obj )
      {
         createObjects();
         initialize();
         AV13pUserId = Convert.ToInt64(getParm(obj,0));
         context.httpAjaxContext.ajax_rsp_assign_attri("", false, "AV13pUserId", StringUtil.LTrim( StringUtil.Str( (decimal)(AV13pUserId), 15, 0)));
      }

      public override String getresponse( String sGXDynURL )
      {
         context.SetDefaultTheme("GeneXusXEv2");
         initialize_properties( ) ;
         BackMsgLst = context.GX_msglist;
         context.GX_msglist = LclMsgLst;
         sDynURL = sGXDynURL;
         nGotPars = (short)(1);
         nGXWrapped = (short)(1);
         context.SetWrapped(true);
         PA0E2( ) ;
         WS0E2( ) ;
         WE0E2( ) ;
         this.cleanup();
         context.SetWrapped(false);
         context.GX_msglist = BackMsgLst;
         return "";
      }

      public void responsestatic( String sGXDynURL )
      {
      }

      protected void define_styles( )
      {
         AddStyleSheetFile("calendar-system.css", "?1346380");
         AddThemeStyleSheetFile("", context.GetTheme( )+".css", "?9522669");
         idxLst = 1;
         while ( idxLst <= Form.Jscriptsrc.Count )
         {
            context.AddJavascriptSource(StringUtil.RTrim( Form.Jscriptsrc.Item(idxLst)), "?2014669531493");
            idxLst = (int)(idxLst+1);
         }
         /* End function define_styles */
      }

      protected void include_jscripts( )
      {
         context.AddJavascriptSource("messages.eng.js", "?"+context.GetBuildNumber( 78484));
         context.AddJavascriptSource("gx0010.js", "?2014669531493");
         /* End function include_jscripts */
      }

      protected void sendrow_512( )
      {
         WB0E0( ) ;
         if ( ( 10 * 1 == 0 ) || ( nGXsfl_51_idx <= subGrid1_Recordsperpage( ) * 1 ) )
         {
            Grid1Row = GXWebRow.GetNew(context,Grid1Container);
            if ( subGrid1_Backcolorstyle == 0 )
            {
               /* None style subfile background logic. */
               subGrid1_Backstyle = 0;
               if ( StringUtil.StrCmp(subGrid1_Class, "") != 0 )
               {
                  subGrid1_Linesclass = subGrid1_Class+"Odd";
               }
            }
            else if ( subGrid1_Backcolorstyle == 1 )
            {
               /* Uniform style subfile background logic. */
               subGrid1_Backstyle = 0;
               subGrid1_Backcolor = subGrid1_Allbackcolor;
               if ( StringUtil.StrCmp(subGrid1_Class, "") != 0 )
               {
                  subGrid1_Linesclass = subGrid1_Class+"Uniform";
               }
            }
            else if ( subGrid1_Backcolorstyle == 2 )
            {
               /* Header style subfile background logic. */
               subGrid1_Backstyle = 1;
               if ( StringUtil.StrCmp(subGrid1_Class, "") != 0 )
               {
                  subGrid1_Linesclass = subGrid1_Class+"Odd";
               }
               subGrid1_Backcolor = (int)(0xF6F6F6);
            }
            else if ( subGrid1_Backcolorstyle == 3 )
            {
               /* Report style subfile background logic. */
               subGrid1_Backstyle = 1;
               if ( (int)(nGXsfl_51_idx % (2)) == 0 )
               {
                  subGrid1_Backcolor = (int)(0x0);
                  if ( StringUtil.StrCmp(subGrid1_Class, "") != 0 )
                  {
                     subGrid1_Linesclass = subGrid1_Class+"Even";
                  }
               }
               else
               {
                  subGrid1_Backcolor = (int)(0xF6F6F6);
                  if ( StringUtil.StrCmp(subGrid1_Class, "") != 0 )
                  {
                     subGrid1_Linesclass = subGrid1_Class+"Odd";
                  }
               }
            }
            if ( Grid1Container.GetWrapped() == 1 )
            {
               context.WriteHtmlText( "<tr ") ;
               context.WriteHtmlText( " class=\""+subGrid1_Linesclass+"\" style=\""+""+"\"") ;
               context.WriteHtmlText( " gxrow=\""+sGXsfl_51_idx+"\">") ;
            }
            /* Subfile cell */
            if ( Grid1Container.GetWrapped() == 1 )
            {
               context.WriteHtmlText( "<td valign=\"middle\" align=\""+""+"\""+" style=\""+((-1==0) ? "display:none;" : "")+"\">") ;
            }
            /* Static Bitmap Variable */
            edtavLinkselection_Link = "javascript:gx.popup.gxReturn(["+"'"+GXUtil.EncodeJSConstant( StringUtil.LTrim( StringUtil.NToC( (decimal)(A43UserId), 15, 0, ".", "")))+"'"+"]);";
            ClassString = "Image";
            StyleString = "";
            AV5LinkSelection_IsBlob = (bool)((String.IsNullOrEmpty(StringUtil.RTrim( AV5LinkSelection))&&String.IsNullOrEmpty(StringUtil.RTrim( AV16Linkselection_GXI)))||!String.IsNullOrEmpty(StringUtil.RTrim( AV5LinkSelection)));
            Grid1Row.AddColumnProperties("bitmap", 1, isAjaxCallMode( ), new Object[] {(String)edtavLinkselection_Internalname,(String.IsNullOrEmpty(StringUtil.RTrim( AV5LinkSelection)) ? AV16Linkselection_GXI : context.PathToRelativeUrl( AV5LinkSelection)),(String)edtavLinkselection_Link,(String)"",(String)"",context.GetTheme( ),(short)-1,(short)1,(String)"",(String)"Select",(short)0,(short)-1,(short)0,(String)"px",(short)0,(String)"px",(short)0,(short)0,(short)0,(String)"",(String)"",(String)StyleString,(String)ClassString,(String)"",(String)"",(String)"",(String)"''",(String)"",(short)1,(bool)AV5LinkSelection_IsBlob,(bool)false});
            /* Subfile cell */
            if ( Grid1Container.GetWrapped() == 1 )
            {
               context.WriteHtmlText( "<td valign=\"middle\" align=\""+"right"+"\""+" style=\""+((-1==0) ? "display:none;" : "")+"\">") ;
            }
            /* Single line edit */
            ClassString = "Attribute";
            StyleString = "";
            ROClassString = ClassString;
            edtUserId_Link = "javascript:gx.popup.gxReturn(["+"'"+GXUtil.EncodeJSConstant( StringUtil.LTrim( StringUtil.NToC( (decimal)(A43UserId), 15, 0, ".", "")))+"'"+"]);";
            Grid1Row.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtUserId_Internalname,StringUtil.LTrim( StringUtil.NToC( (decimal)(A43UserId), 15, 0, ".", "")),context.localUtil.Format( (decimal)(A43UserId), "ZZZZZZZZZZZZZZ9"),(String)"",(String)"",(String)edtUserId_Link,(String)"",(String)"Select",(String)"",(String)edtUserId_Jsonclick,(short)0,(String)ClassString,(String)StyleString,(String)ROClassString,(short)-1,(short)0,(short)0,(String)"text",(String)"",(short)0,(String)"px",(short)17,(String)"px",(short)15,(short)0,(short)0,(short)51,(short)1,(short)1,(short)0,(bool)true,(String)"Id",(String)"right"});
            /* Subfile cell */
            if ( Grid1Container.GetWrapped() == 1 )
            {
               context.WriteHtmlText( "<td valign=\"middle\" align=\""+"right"+"\""+" style=\""+((-1==0) ? "display:none;" : "")+"\">") ;
            }
            /* Single line edit */
            ClassString = "Attribute";
            StyleString = "";
            ROClassString = ClassString;
            Grid1Row.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtUserCID_Internalname,StringUtil.LTrim( StringUtil.NToC( (decimal)(A1UserCID), 6, 0, ".", "")),context.localUtil.Format( (decimal)(A1UserCID), "ZZZZZZ"),(String)"",(String)"",(String)"",(String)"",(String)"",(String)"",(String)edtUserCID_Jsonclick,(short)0,(String)ClassString,(String)StyleString,(String)ROClassString,(short)-1,(short)0,(short)0,(String)"text",(String)"",(short)0,(String)"px",(short)17,(String)"px",(short)6,(short)0,(short)0,(short)51,(short)1,(short)1,(short)0,(bool)true,(String)"",(String)"right"});
            /* Subfile cell */
            if ( Grid1Container.GetWrapped() == 1 )
            {
               context.WriteHtmlText( "<td valign=\"middle\" align=\""+"right"+"\""+" style=\""+((-1==0) ? "display:none;" : "")+"\">") ;
            }
            /* Single line edit */
            ClassString = "Attribute";
            StyleString = "";
            ROClassString = ClassString;
            Grid1Row.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtUserIniciacao_Internalname,context.localUtil.Format(A3UserIniciacao, "99/99/9999"),context.localUtil.Format( A3UserIniciacao, "99/99/9999"),(String)"",(String)"",(String)"",(String)"",(String)"",(String)"",(String)edtUserIniciacao_Jsonclick,(short)0,(String)ClassString,(String)StyleString,(String)ROClassString,(short)-1,(short)0,(short)0,(String)"text",(String)"",(short)0,(String)"px",(short)17,(String)"px",(short)10,(short)0,(short)0,(short)51,(short)1,(short)1,(short)0,(bool)true,(String)"",(String)"right"});
            /* Subfile cell */
            if ( Grid1Container.GetWrapped() == 1 )
            {
               context.WriteHtmlText( "<td valign=\"middle\" align=\""+"right"+"\""+" style=\""+((-1==0) ? "display:none;" : "")+"\">") ;
            }
            /* Single line edit */
            ClassString = "Attribute";
            StyleString = "";
            ROClassString = ClassString;
            Grid1Row.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtUserElevacao_Internalname,context.localUtil.Format(A4UserElevacao, "99/99/9999"),context.localUtil.Format( A4UserElevacao, "99/99/9999"),(String)"",(String)"",(String)"",(String)"",(String)"",(String)"",(String)edtUserElevacao_Jsonclick,(short)0,(String)ClassString,(String)StyleString,(String)ROClassString,(short)-1,(short)0,(short)0,(String)"text",(String)"",(short)0,(String)"px",(short)17,(String)"px",(short)10,(short)0,(short)0,(short)51,(short)1,(short)1,(short)0,(bool)true,(String)"",(String)"right"});
            /* Subfile cell */
            if ( Grid1Container.GetWrapped() == 1 )
            {
               context.WriteHtmlText( "<td valign=\"middle\" align=\""+"left"+"\""+" style=\""+((-1==0) ? "display:none;" : "")+"\">") ;
            }
            /* Single line edit */
            ClassString = "Attribute";
            StyleString = "";
            ROClassString = ClassString;
            Grid1Row.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtUserRG_Internalname,StringUtil.RTrim( A5UserRG),(String)"",(String)"",(String)"",(String)"",(String)"",(String)"",(String)"",(String)edtUserRG_Jsonclick,(short)0,(String)ClassString,(String)StyleString,(String)ROClassString,(short)-1,(short)0,(short)0,(String)"text",(String)"",(short)0,(String)"px",(short)17,(String)"px",(short)12,(short)0,(short)0,(short)51,(short)1,(short)1,(short)-1,(bool)true,(String)"",(String)"left"});
            /* Subfile cell */
            if ( Grid1Container.GetWrapped() == 1 )
            {
               context.WriteHtmlText( "<td valign=\"middle\" align=\""+"left"+"\""+" style=\""+((-1==0) ? "display:none;" : "")+"\">") ;
            }
            /* Single line edit */
            ClassString = "Attribute";
            StyleString = "";
            ROClassString = ClassString;
            Grid1Row.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtUserCPF_Internalname,StringUtil.LTrim( StringUtil.NToC( (decimal)(A6UserCPF), 11, 0, ".", "")),context.localUtil.Format( (decimal)(A6UserCPF), "ZZZZZZZZZZZ"),(String)"",(String)"",(String)"",(String)"",(String)"",(String)"",(String)edtUserCPF_Jsonclick,(short)0,(String)ClassString,(String)StyleString,(String)ROClassString,(short)-1,(short)0,(short)0,(String)"text",(String)"",(short)0,(String)"px",(short)17,(String)"px",(short)11,(short)0,(short)0,(short)51,(short)1,(short)1,(short)0,(bool)true,(String)"",(String)"left"});
            /* Subfile cell */
            if ( Grid1Container.GetWrapped() == 1 )
            {
               context.WriteHtmlText( "<td valign=\"middle\" align=\""+"left"+"\""+" style=\""+((-1==0) ? "display:none;" : "")+"\">") ;
            }
            /* Single line edit */
            ClassString = "Attribute";
            StyleString = "";
            ROClassString = ClassString;
            Grid1Row.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtUserTel_Internalname,StringUtil.RTrim( A7UserTel),(String)"",(String)"",(String)"",(String)"",(String)"",(String)"",(String)"",(String)edtUserTel_Jsonclick,(short)0,(String)ClassString,(String)StyleString,(String)ROClassString,(short)-1,(short)0,(short)0,(String)"text",(String)"",(short)0,(String)"px",(short)17,(String)"px",(short)14,(short)0,(short)0,(short)51,(short)1,(short)1,(short)-1,(bool)true,(String)"",(String)"left"});
            /* Subfile cell */
            if ( Grid1Container.GetWrapped() == 1 )
            {
               context.WriteHtmlText( "<td valign=\"middle\" align=\""+"left"+"\""+" style=\""+((-1==0) ? "display:none;" : "")+"\">") ;
            }
            /* Single line edit */
            ClassString = "Attribute";
            StyleString = "";
            ROClassString = ClassString;
            Grid1Row.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtUserCel_Internalname,StringUtil.RTrim( A8UserCel),(String)"",(String)"",(String)"",(String)"",(String)"",(String)"",(String)"",(String)edtUserCel_Jsonclick,(short)0,(String)ClassString,(String)StyleString,(String)ROClassString,(short)-1,(short)0,(short)0,(String)"text",(String)"",(short)0,(String)"px",(short)17,(String)"px",(short)15,(short)0,(short)0,(short)51,(short)1,(short)1,(short)-1,(bool)true,(String)"",(String)"left"});
            /* Subfile cell */
            if ( Grid1Container.GetWrapped() == 1 )
            {
               context.WriteHtmlText( "<td valign=\"middle\" align=\""+"right"+"\""+" style=\""+((-1==0) ? "display:none;" : "")+"\">") ;
            }
            /* Single line edit */
            ClassString = "Attribute";
            StyleString = "";
            ROClassString = ClassString;
            Grid1Row.AddColumnProperties("edit", 1, isAjaxCallMode( ), new Object[] {(String)edtUserEnderecoNumero_Internalname,StringUtil.LTrim( StringUtil.NToC( (decimal)(A10UserEnderecoNumero), 5, 0, ".", "")),context.localUtil.Format( (decimal)(A10UserEnderecoNumero), "ZZZZZ"),(String)"",(String)"",(String)"",(String)"",(String)"",(String)"",(String)edtUserEnderecoNumero_Jsonclick,(short)0,(String)ClassString,(String)StyleString,(String)ROClassString,(short)-1,(short)0,(short)0,(String)"text",(String)"",(short)0,(String)"px",(short)17,(String)"px",(short)5,(short)0,(short)0,(short)51,(short)1,(short)1,(short)0,(bool)true,(String)"",(String)"right"});
            Grid1Container.AddRow(Grid1Row);
            nGXsfl_51_idx = (short)(((subGrid1_Islastpage==1)&&(nGXsfl_51_idx+1>subGrid1_Recordsperpage( )) ? 1 : nGXsfl_51_idx+1));
            sGXsfl_51_idx = StringUtil.PadL( StringUtil.LTrim( StringUtil.Str( (decimal)(nGXsfl_51_idx), 4, 0)), 4, "0");
            edtavLinkselection_Internalname = "vLINKSELECTION_"+sGXsfl_51_idx;
            edtUserId_Internalname = "USERID_"+sGXsfl_51_idx;
            edtUserCID_Internalname = "USERCID_"+sGXsfl_51_idx;
            edtUserIniciacao_Internalname = "USERINICIACAO_"+sGXsfl_51_idx;
            edtUserElevacao_Internalname = "USERELEVACAO_"+sGXsfl_51_idx;
            edtUserRG_Internalname = "USERRG_"+sGXsfl_51_idx;
            edtUserCPF_Internalname = "USERCPF_"+sGXsfl_51_idx;
            edtUserTel_Internalname = "USERTEL_"+sGXsfl_51_idx;
            edtUserCel_Internalname = "USERCEL_"+sGXsfl_51_idx;
            edtUserEnderecoNumero_Internalname = "USERENDERECONUMERO_"+sGXsfl_51_idx;
         }
         /* End function sendrow_512 */
      }

      protected void init_default_properties( )
      {
         lblTextblockuserid_Internalname = "TEXTBLOCKUSERID";
         edtavCuserid_Internalname = "vCUSERID";
         lblTextblockusercid_Internalname = "TEXTBLOCKUSERCID";
         edtavCusercid_Internalname = "vCUSERCID";
         lblTextblockuseriniciacao_Internalname = "TEXTBLOCKUSERINICIACAO";
         edtavCuseriniciacao_Internalname = "vCUSERINICIACAO";
         lblTextblockuserelevacao_Internalname = "TEXTBLOCKUSERELEVACAO";
         edtavCuserelevacao_Internalname = "vCUSERELEVACAO";
         lblTextblockuserrg_Internalname = "TEXTBLOCKUSERRG";
         edtavCuserrg_Internalname = "vCUSERRG";
         lblTextblockusercpf_Internalname = "TEXTBLOCKUSERCPF";
         edtavCusercpf_Internalname = "vCUSERCPF";
         lblTextblockusertel_Internalname = "TEXTBLOCKUSERTEL";
         edtavCusertel_Internalname = "vCUSERTEL";
         tblTable2_Internalname = "TABLE2";
         grpGroup1_Internalname = "GROUP1";
         bttBtn_cancel_Internalname = "BTN_CANCEL";
         tblTable4_Internalname = "TABLE4";
         tblTable3_Internalname = "TABLE3";
         grpGroup2_Internalname = "GROUP2";
         tblTable1_Internalname = "TABLE1";
         Form.Internalname = "FORM";
         subGrid1_Internalname = "GRID1";
      }

      public override void initialize_properties( )
      {
         init_default_properties( ) ;
         edtUserEnderecoNumero_Jsonclick = "";
         edtUserCel_Jsonclick = "";
         edtUserTel_Jsonclick = "";
         edtUserCPF_Jsonclick = "";
         edtUserRG_Jsonclick = "";
         edtUserElevacao_Jsonclick = "";
         edtUserIniciacao_Jsonclick = "";
         edtUserCID_Jsonclick = "";
         edtUserId_Jsonclick = "";
         edtavCusertel_Jsonclick = "";
         edtavCusercpf_Jsonclick = "";
         edtavCuserrg_Jsonclick = "";
         edtavCuserelevacao_Jsonclick = "";
         edtavCuseriniciacao_Jsonclick = "";
         edtavCusercid_Jsonclick = "";
         edtavCuserid_Jsonclick = "";
         subGrid1_Allowcollapsing = 0;
         subGrid1_Allowselection = 0;
         edtUserId_Link = "";
         edtavLinkselection_Link = "";
         subGrid1_Class = "Grid";
         subGrid1_Backcolorstyle = 2;
         Form.Headerrawhtml = "";
         Form.Background = "";
         Form.Backcolor = (int)(0xFFFFFF);
         Form.Caption = "Selection List User";
         context.GX_msglist.DisplayMode = 1;
      }

      public void cleanup( )
      {
         flushBuffer();
         CloseOpenCursors();
         if ( IsMain )
         {
            context.CloseConnections() ;
         }
      }

      protected void CloseOpenCursors( )
      {
      }

      public override void initialize( )
      {
         gxfirstwebparm = "";
         gxfirstwebparm_bkp = "";
         AV8cUserIniciacao = DateTime.MinValue;
         AV9cUserElevacao = DateTime.MinValue;
         AV10cUserRG = "";
         AV12cUserTel = "";
         sDynURL = "";
         FormProcess = "";
         GX_FocusControl = "";
         Form = new GXWebForm();
         sPrefix = "";
         sEvt = "";
         EvtGridId = "";
         EvtRowId = "";
         sEvtType = "";
         edtavLinkselection_Internalname = "";
         edtUserId_Internalname = "";
         edtUserCID_Internalname = "";
         edtUserIniciacao_Internalname = "";
         edtUserElevacao_Internalname = "";
         edtUserRG_Internalname = "";
         edtUserCPF_Internalname = "";
         edtUserTel_Internalname = "";
         edtUserCel_Internalname = "";
         edtUserEnderecoNumero_Internalname = "";
         AV5LinkSelection = "";
         A3UserIniciacao = DateTime.MinValue;
         A4UserElevacao = DateTime.MinValue;
         A5UserRG = "";
         A7UserTel = "";
         A8UserCel = "";
         GXKey = "";
         Grid1Container = new GXWebGrid( context);
         BackMsgLst = new msglist();
         LclMsgLst = new msglist();
         scmdbuf = "";
         lV10cUserRG = "";
         lV12cUserTel = "";
         H000E2_A10UserEnderecoNumero = new int[1] ;
         H000E2_A8UserCel = new String[] {""} ;
         H000E2_A7UserTel = new String[] {""} ;
         H000E2_A6UserCPF = new long[1] ;
         H000E2_A5UserRG = new String[] {""} ;
         H000E2_A4UserElevacao = new DateTime[] {DateTime.MinValue} ;
         H000E2_A3UserIniciacao = new DateTime[] {DateTime.MinValue} ;
         H000E2_A1UserCID = new int[1] ;
         H000E2_A43UserId = new long[1] ;
         H000E3_AGRID1_nRecordCount = new int[1] ;
         AV16Linkselection_GXI = "";
         sStyleString = "";
         ClassString = "";
         StyleString = "";
         subGrid1_Linesclass = "";
         Grid1Column = new GXWebColumn();
         TempTags = "";
         bttBtn_cancel_Jsonclick = "";
         lblTextblockuserid_Jsonclick = "";
         lblTextblockusercid_Jsonclick = "";
         lblTextblockuseriniciacao_Jsonclick = "";
         lblTextblockuserelevacao_Jsonclick = "";
         lblTextblockuserrg_Jsonclick = "";
         lblTextblockusercpf_Jsonclick = "";
         lblTextblockusertel_Jsonclick = "";
         Grid1Row = new GXWebRow();
         ROClassString = "";
         pr_default = new DataStoreProvider(context, new GeneXus.Programs.gx0010__default(),
            new Object[][] {
                new Object[] {
               H000E2_A10UserEnderecoNumero, H000E2_A8UserCel, H000E2_A7UserTel, H000E2_A6UserCPF, H000E2_A5UserRG, H000E2_A4UserElevacao, H000E2_A3UserIniciacao, H000E2_A1UserCID, H000E2_A43UserId
               }
               , new Object[] {
               H000E3_AGRID1_nRecordCount
               }
            }
         );
         /* GeneXus formulas. */
         context.Gx_err = 0;
      }

      private short nGotPars ;
      private short GxWebError ;
      private short nRC_Grid1 ;
      private short nGXsfl_51_idx=1 ;
      private short initialized ;
      private short gxajaxcallmode ;
      private short GRID1_nEOF ;
      private short wbEnd ;
      private short wbStart ;
      private short nDonePA ;
      private short gxcookieaux ;
      private short subGrid1_Rows ;
      private short subGrid1_Backcolorstyle ;
      private short subGrid1_Titlebackstyle ;
      private short subGrid1_Allowselection ;
      private short subGrid1_Allowhovering ;
      private short subGrid1_Allowcollapsing ;
      private short subGrid1_Collapsed ;
      private short nGXWrapped ;
      private short subGrid1_Backstyle ;
      private int Grid1_PageSize51 ;
      private int AV7cUserCID ;
      private int GRID1_nFirstRecordOnPage ;
      private int A1UserCID ;
      private int A10UserEnderecoNumero ;
      private int subGrid1_Islastpage ;
      private int GXPagingFrom2 ;
      private int GRID1_nCurrentRecord ;
      private int GRID1_nRecordCount ;
      private int subGrid1_Titlebackcolor ;
      private int subGrid1_Allbackcolor ;
      private int subGrid1_Selectioncolor ;
      private int subGrid1_Hoveringcolor ;
      private int idxLst ;
      private int subGrid1_Backcolor ;
      private long AV6cUserId ;
      private long AV11cUserCPF ;
      private long AV13pUserId ;
      private long A43UserId ;
      private long A6UserCPF ;
      private long GXPagingTo2 ;
      private String gxfirstwebparm ;
      private String gxfirstwebparm_bkp ;
      private String sGXsfl_51_idx="0001" ;
      private String sDynURL ;
      private String FormProcess ;
      private String GX_FocusControl ;
      private String sPrefix ;
      private String sEvt ;
      private String EvtGridId ;
      private String EvtRowId ;
      private String sEvtType ;
      private String edtavLinkselection_Internalname ;
      private String edtUserId_Internalname ;
      private String edtUserCID_Internalname ;
      private String edtUserIniciacao_Internalname ;
      private String edtUserElevacao_Internalname ;
      private String edtUserRG_Internalname ;
      private String edtUserCPF_Internalname ;
      private String edtUserTel_Internalname ;
      private String edtUserCel_Internalname ;
      private String edtUserEnderecoNumero_Internalname ;
      private String GXKey ;
      private String edtavCuserid_Internalname ;
      private String scmdbuf ;
      private String edtavCusercid_Internalname ;
      private String edtavCuseriniciacao_Internalname ;
      private String edtavCuserelevacao_Internalname ;
      private String edtavCuserrg_Internalname ;
      private String edtavCusercpf_Internalname ;
      private String edtavCusertel_Internalname ;
      private String sStyleString ;
      private String tblTable1_Internalname ;
      private String ClassString ;
      private String StyleString ;
      private String grpGroup1_Internalname ;
      private String grpGroup2_Internalname ;
      private String tblTable3_Internalname ;
      private String subGrid1_Internalname ;
      private String subGrid1_Class ;
      private String subGrid1_Linesclass ;
      private String edtavLinkselection_Link ;
      private String edtUserId_Link ;
      private String tblTable4_Internalname ;
      private String TempTags ;
      private String bttBtn_cancel_Internalname ;
      private String bttBtn_cancel_Jsonclick ;
      private String tblTable2_Internalname ;
      private String lblTextblockuserid_Internalname ;
      private String lblTextblockuserid_Jsonclick ;
      private String edtavCuserid_Jsonclick ;
      private String lblTextblockusercid_Internalname ;
      private String lblTextblockusercid_Jsonclick ;
      private String edtavCusercid_Jsonclick ;
      private String lblTextblockuseriniciacao_Internalname ;
      private String lblTextblockuseriniciacao_Jsonclick ;
      private String edtavCuseriniciacao_Jsonclick ;
      private String lblTextblockuserelevacao_Internalname ;
      private String lblTextblockuserelevacao_Jsonclick ;
      private String edtavCuserelevacao_Jsonclick ;
      private String lblTextblockuserrg_Internalname ;
      private String lblTextblockuserrg_Jsonclick ;
      private String edtavCuserrg_Jsonclick ;
      private String lblTextblockusercpf_Internalname ;
      private String lblTextblockusercpf_Jsonclick ;
      private String edtavCusercpf_Jsonclick ;
      private String lblTextblockusertel_Internalname ;
      private String lblTextblockusertel_Jsonclick ;
      private String edtavCusertel_Jsonclick ;
      private String ROClassString ;
      private String edtUserId_Jsonclick ;
      private String edtUserCID_Jsonclick ;
      private String edtUserIniciacao_Jsonclick ;
      private String edtUserElevacao_Jsonclick ;
      private String edtUserRG_Jsonclick ;
      private String edtUserCPF_Jsonclick ;
      private String edtUserTel_Jsonclick ;
      private String edtUserCel_Jsonclick ;
      private String edtUserEnderecoNumero_Jsonclick ;
      private DateTime AV8cUserIniciacao ;
      private DateTime AV9cUserElevacao ;
      private DateTime A3UserIniciacao ;
      private DateTime A4UserElevacao ;
      private bool entryPointCalled ;
      private bool wbLoad ;
      private bool Rfr0gs ;
      private bool wbErr ;
      private bool returnInSub ;
      private bool AV5LinkSelection_IsBlob ;
      private String AV10cUserRG ;
      private String AV12cUserTel ;
      private String A5UserRG ;
      private String A7UserTel ;
      private String A8UserCel ;
      private String lV10cUserRG ;
      private String lV12cUserTel ;
      private String AV16Linkselection_GXI ;
      private String AV5LinkSelection ;
      private GXMasterPage MasterPageObj ;
      private GXWebGrid Grid1Container ;
      private GXWebRow Grid1Row ;
      private GXWebColumn Grid1Column ;
      private IGxDataStore dsDefault ;
      private msglist BackMsgLst ;
      private msglist LclMsgLst ;
      private IDataStoreProvider pr_default ;
      private int[] H000E2_A10UserEnderecoNumero ;
      private String[] H000E2_A8UserCel ;
      private String[] H000E2_A7UserTel ;
      private long[] H000E2_A6UserCPF ;
      private String[] H000E2_A5UserRG ;
      private DateTime[] H000E2_A4UserElevacao ;
      private DateTime[] H000E2_A3UserIniciacao ;
      private int[] H000E2_A1UserCID ;
      private long[] H000E2_A43UserId ;
      private int[] H000E3_AGRID1_nRecordCount ;
      private long aP0_pUserId ;
      private GXWebForm Form ;
   }

   public class gx0010__default : DataStoreHelperBase, IDataStoreHelper
   {
      protected Object[] conditional_H000E2( IGxContext context ,
                                             int AV7cUserCID ,
                                             DateTime AV8cUserIniciacao ,
                                             DateTime AV9cUserElevacao ,
                                             String AV10cUserRG ,
                                             long AV11cUserCPF ,
                                             String AV12cUserTel ,
                                             int A1UserCID ,
                                             DateTime A3UserIniciacao ,
                                             DateTime A4UserElevacao ,
                                             String A5UserRG ,
                                             long A6UserCPF ,
                                             String A7UserTel ,
                                             long AV6cUserId )
      {
         String sWhereString = "" ;
         String scmdbuf ;
         short[] GXv_int1 ;
         GXv_int1 = new short [12] ;
         Object[] GXv_Object2 ;
         GXv_Object2 = new Object [2] ;
         String sSelectString ;
         String sFromString ;
         String sOrderString ;
         sSelectString = " [UserEnderecoNumero], [UserCel], [UserTel], [UserCPF], [UserRG], [UserElevacao], [UserIniciacao], [UserCID], [UserId]";
         sFromString = " FROM [TBLUser] WITH (NOLOCK)";
         sOrderString = "";
         sWhereString = sWhereString + " WHERE ([UserId] >= @AV6cUserId)";
         if ( ! (0==AV7cUserCID) )
         {
            sWhereString = sWhereString + " and ([UserCID] >= @AV7cUserCID)";
         }
         else
         {
            GXv_int1[1] = 1;
         }
         if ( ! (DateTime.MinValue==AV8cUserIniciacao) )
         {
            sWhereString = sWhereString + " and ([UserIniciacao] >= @AV8cUserIniciacao)";
         }
         else
         {
            GXv_int1[2] = 1;
         }
         if ( ! (DateTime.MinValue==AV9cUserElevacao) )
         {
            sWhereString = sWhereString + " and ([UserElevacao] >= @AV9cUserElevacao)";
         }
         else
         {
            GXv_int1[3] = 1;
         }
         if ( ! String.IsNullOrEmpty(StringUtil.RTrim( AV10cUserRG)) )
         {
            sWhereString = sWhereString + " and ([UserRG] like @lV10cUserRG)";
         }
         else
         {
            GXv_int1[4] = 1;
         }
         if ( ! (0==AV11cUserCPF) )
         {
            sWhereString = sWhereString + " and ([UserCPF] >= @AV11cUserCPF)";
         }
         else
         {
            GXv_int1[5] = 1;
         }
         if ( ! String.IsNullOrEmpty(StringUtil.RTrim( AV12cUserTel)) )
         {
            sWhereString = sWhereString + " and ([UserTel] like @lV12cUserTel)";
         }
         else
         {
            GXv_int1[6] = 1;
         }
         sOrderString = sOrderString + " ORDER BY [UserId]";
         scmdbuf = "SELECT * FROM (SELECT " + sSelectString + ", ROW_NUMBER() OVER (" + sOrderString + " ) AS GX_ROW_NUMBER" + sFromString + sWhereString + ") AS GX_CTE WHERE GX_ROW_NUMBER" + " BETWEEN " + "@GXPagingFrom2" + " AND " + "@GXPagingTo2" + " OR " + "@GXPagingTo2" + " < " + "@GXPagingFrom2" + " AND GX_ROW_NUMBER >= " + "@GXPagingFrom2";
         scmdbuf = scmdbuf + " OPTION (FAST 11)";
         GXv_Object2[0] = scmdbuf;
         GXv_Object2[1] = (Object)(GXv_int1);
         return GXv_Object2 ;
      }

      protected Object[] conditional_H000E3( IGxContext context ,
                                             int AV7cUserCID ,
                                             DateTime AV8cUserIniciacao ,
                                             DateTime AV9cUserElevacao ,
                                             String AV10cUserRG ,
                                             long AV11cUserCPF ,
                                             String AV12cUserTel ,
                                             int A1UserCID ,
                                             DateTime A3UserIniciacao ,
                                             DateTime A4UserElevacao ,
                                             String A5UserRG ,
                                             long A6UserCPF ,
                                             String A7UserTel ,
                                             long AV6cUserId )
      {
         String sWhereString = "" ;
         String scmdbuf ;
         short[] GXv_int3 ;
         GXv_int3 = new short [7] ;
         Object[] GXv_Object4 ;
         GXv_Object4 = new Object [2] ;
         scmdbuf = "SELECT COUNT(*) FROM [TBLUser] WITH (NOLOCK)";
         scmdbuf = scmdbuf + " WHERE ([UserId] >= @AV6cUserId)";
         if ( ! (0==AV7cUserCID) )
         {
            sWhereString = sWhereString + " and ([UserCID] >= @AV7cUserCID)";
         }
         else
         {
            GXv_int3[1] = 1;
         }
         if ( ! (DateTime.MinValue==AV8cUserIniciacao) )
         {
            sWhereString = sWhereString + " and ([UserIniciacao] >= @AV8cUserIniciacao)";
         }
         else
         {
            GXv_int3[2] = 1;
         }
         if ( ! (DateTime.MinValue==AV9cUserElevacao) )
         {
            sWhereString = sWhereString + " and ([UserElevacao] >= @AV9cUserElevacao)";
         }
         else
         {
            GXv_int3[3] = 1;
         }
         if ( ! String.IsNullOrEmpty(StringUtil.RTrim( AV10cUserRG)) )
         {
            sWhereString = sWhereString + " and ([UserRG] like @lV10cUserRG)";
         }
         else
         {
            GXv_int3[4] = 1;
         }
         if ( ! (0==AV11cUserCPF) )
         {
            sWhereString = sWhereString + " and ([UserCPF] >= @AV11cUserCPF)";
         }
         else
         {
            GXv_int3[5] = 1;
         }
         if ( ! String.IsNullOrEmpty(StringUtil.RTrim( AV12cUserTel)) )
         {
            sWhereString = sWhereString + " and ([UserTel] like @lV12cUserTel)";
         }
         else
         {
            GXv_int3[6] = 1;
         }
         scmdbuf = scmdbuf + sWhereString;
         scmdbuf = scmdbuf + "";
         GXv_Object4[0] = scmdbuf;
         GXv_Object4[1] = (Object)(GXv_int3);
         return GXv_Object4 ;
      }

      public override Object [] getDynamicStatement( int cursor ,
                                                     IGxContext context ,
                                                     Object [] dynConstraints )
      {
         switch ( cursor )
         {
               case 0 :
                     return conditional_H000E2(context, (int)dynConstraints[0] , (DateTime)dynConstraints[1] , (DateTime)dynConstraints[2] , (String)dynConstraints[3] , (long)dynConstraints[4] , (String)dynConstraints[5] , (int)dynConstraints[6] , (DateTime)dynConstraints[7] , (DateTime)dynConstraints[8] , (String)dynConstraints[9] , (long)dynConstraints[10] , (String)dynConstraints[11] , (long)dynConstraints[12] );
               case 1 :
                     return conditional_H000E3(context, (int)dynConstraints[0] , (DateTime)dynConstraints[1] , (DateTime)dynConstraints[2] , (String)dynConstraints[3] , (long)dynConstraints[4] , (String)dynConstraints[5] , (int)dynConstraints[6] , (DateTime)dynConstraints[7] , (DateTime)dynConstraints[8] , (String)dynConstraints[9] , (long)dynConstraints[10] , (String)dynConstraints[11] , (long)dynConstraints[12] );
         }
         return base.getDynamicStatement(cursor, context, dynConstraints);
      }

      public ICursor[] getCursors( )
      {
         cursorDefinitions();
         return new Cursor[] {
          new ForEachCursor(def[0])
         ,new ForEachCursor(def[1])
       };
    }

    private static CursorDef[] def;
    private void cursorDefinitions( )
    {
       if ( def == null )
       {
          Object[] prmH000E2 ;
          prmH000E2 = new Object[] {
          new Object[] {"@AV6cUserId",SqlDbType.Decimal,15,0} ,
          new Object[] {"@AV7cUserCID",SqlDbType.Int,6,0} ,
          new Object[] {"@AV8cUserIniciacao",SqlDbType.DateTime,8,0} ,
          new Object[] {"@AV9cUserElevacao",SqlDbType.DateTime,8,0} ,
          new Object[] {"@lV10cUserRG",SqlDbType.VarChar,12,0} ,
          new Object[] {"@AV11cUserCPF",SqlDbType.Decimal,11,0} ,
          new Object[] {"@lV12cUserTel",SqlDbType.VarChar,14,0} ,
          new Object[] {"@GXPagingFrom2",SqlDbType.Int,6,0} ,
          new Object[] {"@GXPagingTo2",SqlDbType.Decimal,12,0} ,
          new Object[] {"@GXPagingTo2",SqlDbType.Decimal,12,0} ,
          new Object[] {"@GXPagingFrom2",SqlDbType.Int,6,0} ,
          new Object[] {"@GXPagingFrom2",SqlDbType.Int,6,0}
          } ;
          Object[] prmH000E3 ;
          prmH000E3 = new Object[] {
          new Object[] {"@AV6cUserId",SqlDbType.Decimal,15,0} ,
          new Object[] {"@AV7cUserCID",SqlDbType.Int,6,0} ,
          new Object[] {"@AV8cUserIniciacao",SqlDbType.DateTime,8,0} ,
          new Object[] {"@AV9cUserElevacao",SqlDbType.DateTime,8,0} ,
          new Object[] {"@lV10cUserRG",SqlDbType.VarChar,12,0} ,
          new Object[] {"@AV11cUserCPF",SqlDbType.Decimal,11,0} ,
          new Object[] {"@lV12cUserTel",SqlDbType.VarChar,14,0}
          } ;
          def= new CursorDef[] {
              new CursorDef("H000E2", "scmdbuf",false, GxErrorMask.GX_NOMASK | GxErrorMask.GX_MASKLOOPLOCK, false, this,prmH000E2,11,0,false,false )
             ,new CursorDef("H000E3", "scmdbuf",false, GxErrorMask.GX_NOMASK | GxErrorMask.GX_MASKLOOPLOCK, false, this,prmH000E3,1,0,false,false )
          };
       }
    }

    public void getResults( int cursor ,
                            IFieldGetter rslt ,
                            Object[] buf )
    {
       switch ( cursor )
       {
             case 0 :
                ((int[]) buf[0])[0] = rslt.getInt(1) ;
                ((String[]) buf[1])[0] = rslt.getVarchar(2) ;
                ((String[]) buf[2])[0] = rslt.getVarchar(3) ;
                ((long[]) buf[3])[0] = rslt.getLong(4) ;
                ((String[]) buf[4])[0] = rslt.getVarchar(5) ;
                ((DateTime[]) buf[5])[0] = rslt.getGXDate(6) ;
                ((DateTime[]) buf[6])[0] = rslt.getGXDate(7) ;
                ((int[]) buf[7])[0] = rslt.getInt(8) ;
                ((long[]) buf[8])[0] = rslt.getLong(9) ;
                break;
             case 1 :
                ((int[]) buf[0])[0] = rslt.getInt(1) ;
                break;
       }
    }

    public void setParameters( int cursor ,
                               IFieldSetter stmt ,
                               Object[] parms )
    {
       short sIdx ;
       switch ( cursor )
       {
             case 0 :
                sIdx = 0;
                if ( (short)parms[0] == 0 )
                {
                   sIdx = (short)(sIdx+1);
                   stmt.SetParameter(sIdx, (long)parms[12]);
                }
                if ( (short)parms[1] == 0 )
                {
                   sIdx = (short)(sIdx+1);
                   stmt.SetParameter(sIdx, (int)parms[13]);
                }
                if ( (short)parms[2] == 0 )
                {
                   sIdx = (short)(sIdx+1);
                   stmt.SetParameter(sIdx, (DateTime)parms[14]);
                }
                if ( (short)parms[3] == 0 )
                {
                   sIdx = (short)(sIdx+1);
                   stmt.SetParameter(sIdx, (DateTime)parms[15]);
                }
                if ( (short)parms[4] == 0 )
                {
                   sIdx = (short)(sIdx+1);
                   stmt.SetParameter(sIdx, (String)parms[16]);
                }
                if ( (short)parms[5] == 0 )
                {
                   sIdx = (short)(sIdx+1);
                   stmt.SetParameter(sIdx, (long)parms[17]);
                }
                if ( (short)parms[6] == 0 )
                {
                   sIdx = (short)(sIdx+1);
                   stmt.SetParameter(sIdx, (String)parms[18]);
                }
                if ( (short)parms[7] == 0 )
                {
                   sIdx = (short)(sIdx+1);
                   stmt.SetParameter(sIdx, (int)parms[19]);
                }
                if ( (short)parms[8] == 0 )
                {
                   sIdx = (short)(sIdx+1);
                   stmt.SetParameter(sIdx, (long)parms[20]);
                }
                if ( (short)parms[9] == 0 )
                {
                   sIdx = (short)(sIdx+1);
                   stmt.SetParameter(sIdx, (long)parms[21]);
                }
                if ( (short)parms[10] == 0 )
                {
                   sIdx = (short)(sIdx+1);
                   stmt.SetParameter(sIdx, (int)parms[22]);
                }
                if ( (short)parms[11] == 0 )
                {
                   sIdx = (short)(sIdx+1);
                   stmt.SetParameter(sIdx, (int)parms[23]);
                }
                break;
             case 1 :
                sIdx = 0;
                if ( (short)parms[0] == 0 )
                {
                   sIdx = (short)(sIdx+1);
                   stmt.SetParameter(sIdx, (long)parms[7]);
                }
                if ( (short)parms[1] == 0 )
                {
                   sIdx = (short)(sIdx+1);
                   stmt.SetParameter(sIdx, (int)parms[8]);
                }
                if ( (short)parms[2] == 0 )
                {
                   sIdx = (short)(sIdx+1);
                   stmt.SetParameter(sIdx, (DateTime)parms[9]);
                }
                if ( (short)parms[3] == 0 )
                {
                   sIdx = (short)(sIdx+1);
                   stmt.SetParameter(sIdx, (DateTime)parms[10]);
                }
                if ( (short)parms[4] == 0 )
                {
                   sIdx = (short)(sIdx+1);
                   stmt.SetParameter(sIdx, (String)parms[11]);
                }
                if ( (short)parms[5] == 0 )
                {
                   sIdx = (short)(sIdx+1);
                   stmt.SetParameter(sIdx, (long)parms[12]);
                }
                if ( (short)parms[6] == 0 )
                {
                   sIdx = (short)(sIdx+1);
                   stmt.SetParameter(sIdx, (String)parms[13]);
                }
                break;
       }
    }

 }

}
